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.0.0.tar.gz (10.9 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.0.0-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for gldb-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3e561547a676eee73d192b80da7d481b2cdc0b7d6353686d4124bd4dbad50b99
MD5 472f0c8190de8158b751ad3fd14c0431
BLAKE2b-256 2fd98cee5de9d7afe8e73381705c7ea5cb0ace3bfeffe9a32961aa3345d9d3f5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gldb-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 13.5 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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6de353e77e3d5257e00181f6c1c87b4e48fd762a81729d2063278de7ec4356a2
MD5 8efd20857aaed54fe6805963ed0f9cd7
BLAKE2b-256 0e8cf4af019ab19d3fb13f21b3d12cab363107ea21b3d384a75083184286d551

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