Skip to main content

Generic linked database approach to manage RDF and raw data together.

Project description

generic-linked-database

Tests Status codecov pyvers Status

An approach to integrate multiple databases behind a unified interface. At least on database is intended to be an RDF database for metadata storage, the others are raw data storages like SQL or noSQL databases.

Quickstart

Installation

Install the package:

pip install gldb

Example

An example exists as Jupyter Notebook in docs/examples/. You may also try it online with Google Colab:

Open Quickstart Notebook

Design

Abstractions

The package provides the following abstractions:

  • GenericLinkedDatabase: The unified interface to interact with the semantic metadata and raw data storage
  • RDFStore: The interface to interact with the semantic metadata storage
  • RawDataStore: The interface to interact with the raw data storage
  • DataStoreManager: The manager to interact with the different data stores
  • Query: The interface to interact with the different data stores
  • RDFStoreQuery: The interface to interact with the semantic metadata storage
  • RawDataStoreQuery: The interface to interact with the raw data storage

Class Diagram

classDiagram
    class GenericLinkedDatabase {
        <<abstract>>
        +StoreManager store_manager
        +linked_upload(filename)
        +execute_query(store_name, query)
    }

    class DataStoreManager {
        +stores: Dict
        +add_store(store_name, store)
        +get_store(store_name)
        +execute_query(store_name, query)
        +upload_file(store_name, filename)
    }

    class DataStore {
        <<abstract>>
        +execute_query(query)
        +upload_file(filename)
    }

    class RDFStore {
        <<abstract>>
        +execute_query(query)
        +upload_file(filename)
    }

    class RawDataStore {
        <<abstract>>
        +execute_query(query)
        +upload_file(filename)
    }

    class Query {
        <<abstract>>
        +execute(*args, **kwargs)
    }

    class RDFStoreQuery {
        <<abstract>>
    }

    class RawDataStoreQuery {
        <<abstract>>
    }
    
    class SparqlQuery {
        +sparql_query: str
        +execute(graph: rdflib.Graph)
    }

    %% Relationships
    GenericLinkedDatabase --> DataStoreManager
    GenericLinkedDatabase --> Query
    DataStoreManager --> DataStore
    DataStore <|-- RDFStore
    DataStore <|-- RawDataStore
    Query <|-- RDFStoreQuery
    Query <|-- RawDataStoreQuery
    RDFStoreQuery <|-- SparqlQuery : implements

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gldb-1.1.0.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gldb-1.1.0-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file gldb-1.1.0.tar.gz.

File metadata

  • Download URL: gldb-1.1.0.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.16

File hashes

Hashes for gldb-1.1.0.tar.gz
Algorithm Hash digest
SHA256 b4ccc3a26fda439824e09507b4ff23e2b48f26ec1f343946622ef882768cd14e
MD5 4199c72f7b5898c04a3cc9d2d55f62c4
BLAKE2b-256 49b8e955545ed49e6fc5e9a667deb776172ef6965d657b9337ba6766a683add9

See more details on using hashes here.

File details

Details for the file gldb-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: gldb-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.16

File hashes

Hashes for gldb-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a5712d682141ac16384b97d72ffc70a2bb5571d23c87d607e3cabdca3a0ea37
MD5 710c26fee6406c2680ab660a2a095971
BLAKE2b-256 f1d3bfad4810eefb75fa1f78d3bf4d8a903d629948fa5bfaf93d212fb2065573

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page