wiki:Drupal/Database

Data /Semantic Metadata Store

one of the OrganikComponents

The Semantic Metadata Store is the central metadata and structured data store in OrganiK. It contains all data about documents (including blog posts, wiki pages, e-mails, ...), all taxonomy data manipulated by the SemanticApi, and the tagging relations connecting documents to taxonomy terms. All Data that OrganiK handles should be kept in this component, to allow fast execution of complex queries over heterogenous data. Storage of binary files is not part of the repository, but may be added by other modules.

All other components can use the data store to manage data. By reusing the same storage engine, it is possible to integrate components faster. Accessing the data store is only allowed for other components through well-defined interfaces which check for security (authentication and authorization) and the correct syntax and semantics of the data.

Technically, the store can be a set of multiple logical storage facilities (databases, files, servers) that work in concertation.

The features of the Semantic Metadata Store are

  • Storing and querying document data (including blog posts, wiki pages, e-mails, ...).
  • Storing and querying taxonomy data.
  • Storing and querying relations between documents and taxonomy.
  • SPARQL support to allow querying OrganiK from external data sources, and Linked Data Support.

Implementation

The store is implemented by reusing the existing Drupal MySQL infrastructure. This is documented here:

Drupal Database

Drupal stores all its data in a relational database and into a file-folder hierarchy. The recommended database is MySQL, each module creates its own tables in the database.

Overview on the database

It is possible to browse the schema of a running Drupal installation using the schema module.

For OrganiK, the most important tables are created by the node, taxonomy, user, and comment modules. The taxonomy tables are extended by the Drupal/SemanticApi with rank-values. For example, the following tables are used by OrganiK:

  • node module: node, node_revision
  • taxonomy module: term_data, term_node
  • user module: users
  • comment module: comments

The exact data structure of OrganiK is documented the same way as Drupal, using a metadata format part of Drupal. Each module has a module.install file implementing a schema hook method. Name, description, type, size, not-null, and default value of a field are used to describe a field (for a full reference, see the Schema API Reference.

Attachments and images are stored as files in the filesystem of the web-server. A special folder sites/ is used for that purpose by Drupal. The attachments are referenced from the database in tables upload and files.

Visualization of the schema

Drupal user mooffie did create a graph visualization of the schema using graphviz:

http://www.typo.co.il/~mooffie/tmp/schemagraph/output/schemagraph-2007-10-18.smaller.png

Last modified 7 years ago Last modified on 07/21/10 12:22:30