Introduction to RDF Databases
Thanks to Semantic Web technologies, we started to connect information on the web by their relationships. In order to build a relationship between datas, RDF triples are used. Basically RDF is a graph data model that formally describes semantics, meaning. It consists of triples which are data entities consisting of subject-predicate-object. For example “Bob is boyfriend of Jane”, “Bob is a Human” and “Human is a Mammal”.
RDF database, also called as Triplestore, is a type of graph database that stores RDF triples. The language used to reach data is called SPARQL — Query Language for RDF. It contains ontologies that are schema models of database. Ontologies represent the formal description of the data and with a help of reasoner they can infer data which leads to advanced data querying.
What are the benefits?
- A simple and uniform standard data model.
On the top of RDF Schema, every RDF databases share the standard data model at their base.
- A powerful standard query language.
With the help of SPARQL and reasoners of ontologies querying data is much powerful.
- Standardized data interchange formats.
RDF databases have import/export capability based on well-defined, standardized which leads exchanging data across different databases very easy.
An example query of a RDF Database
An example from the documents of one of the largest triplestore platform, Stardog.
Ontology, given in Figure 1, shows us the relations of characters in Star Wars movie. With the help of GraphQL query language they use, we can query all characters easily. As shown in Figure 2, query uses reasoner on the top of ontology and it senses that “Human” and “Droid” are sub class of “Character”. By that query finds every character in database.