Skip to main content
Fig. 5 | Journal of Cheminformatics

Fig. 5

From: Advanced SPARQL querying in small molecule databases

Fig. 5

Conversion of ChEBI into RDF form. This example demonstrates the conversion of the ChEBI database from relational form into RDF form. Part a shows selected information about the ChEBI entity with ID 59968. Part b shows the same information coded in RDF form. For better clarity, it is represented as a connected graph. Each triple is represented as an arc labeled by the predicate IRI leading from the subject to the object. Blue arcs represent triples stored directly in the database. Green arcs represent triples inferred by property chains. Literals are represented as boxes, IRIs as rounded boxes, and blank nodes as circles. Dotted line boxes are not parts of the RDF model; they only highlight which table of the relational form was used to generate triples. In relational form, each table contains a primary key named ID. The basic data about the compound are stored in the COMPOUNDS table. In RDF form, the compound is identified by IRI chebiID:59968, and belongs to the chebi:Compound class. The basic data are converted directly as appropriate properties (e.g., chebi:star) of the compound. An exception is the compound name, which is converted as an instance of chebi:PrimaryName. The reason for this is compatibility with representations of other compound names. Other names of compounds are stored in the NAMES table. The COMPOUND_ID is a foreign key that refers into the COMPOUNDS table. The TYPE column lists the type of the name. In this case, the name is coded as an instance of the chebi:Synonym class. Comments are stored in the COMMENTS table. The DATATYPE column indicates which data are commented. In this case, the DATATYPE value is CompoundName, and thus the DATATYPE_ID is a foreign key into the NAMES table. As an example of other features, the CHEMICAL_DATA table is employed. Similarly as for the NAMES table, COMPOUND_ID is a foreign key into the COMPOUNDS table, and the TYPE column indicates the type of the stored data. Therefore, the example chemical data is converted as an instance of the chebi:Formula class. Relations between compounds are stored in RELATIONS tables. Types of relations are listed in the TYPE column. Related compounds are specified indirectly. The RELATIONS table contains foreign keys (INIT_ID and FINAL_ID) that refer to the VERTICE table that translates vertex IDs into the appropriate related compound IDs. In this example case, the relation is coded as an instance of chebi:HasFunctionalParent

Back to article page