Full RDFS Saturation
Example on QA test
We load the QA test graph with saturation:
java -jar ~/inria/code/ontosql/rdf-db/target/RDFDBDirectory/ontosql-rdfdb-1.0.7-SNAPSHOT-with-dependencies.jar -input ../projects/qa-test/qa-test.nt -pf ../projects/qa-test/qa-test.properties
We execute the following queries to get the saturation of the graph.
-- We need to insert the missing line about type in dictinary table INSERT INTO dictionary VALUES (21, '<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>'); SELECT d1.value as s, d2.value as p, d3.value as o FROM encoded_sat, dictionary as d1, dictionary as d2, dictionary as d3 WHERE encoded_sat.s = d1.key AND encoded_sat.p = d2.key AND encoded_sat.o = d3.key;
There are 27 triples in the full saturation computed by rdf-db:
psql -d qatest -c "INSERT INTO dictionary VALUES (21, '<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>');" psql -d qatest -c "SELECT d1.value as s, d2.value as p, d3.value as o FROM encoded_sat, dictionary as d1, dictionary as d2, dictionary as d3 WHERE encoded_sat.s = d1.key AND encoded_sat.p = d2.key AND encoded_sat.o = d3.key;"
s | p | o ---------------+------------------------------------------------------+--------------- <Orsay> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <Thing> <Montpellier> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <Place> <Maxime> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <Thing> <Palaiseau> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <Place> <Ioana> | <livesIn> | <Palaiseau> <Montpellier> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <Thing> <Orsay> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <Place> <Palaiseau> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <Thing> <Orsay> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <City> <Maxime> | <contact> | "245470000" <Place> | <http://www.w3.org/2000/01/rdf-schema#subClassOf> | <Thing> <livesIn> | <http://www.w3.org/2000/01/rdf-schema#range> | <City> <Person> | <http://www.w3.org/2000/01/rdf-schema#subClassOf> | <Thing> <Montpellier> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <City> <Maxime> | <livesIn> | <Orsay> <Palaiseau> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <City> <François> | <livesIn> | <Lannion> <Thing> | <http://www.w3.org/2000/01/rdf-schema#subClassOf> | <Thing> <phoneNumber> | <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> | <contact> <contact> | <http://www.w3.org/2000/01/rdf-schema#domain> | <Person> <City> | <http://www.w3.org/2000/01/rdf-schema#subClassOf> | <Place> <Lannion> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <City> <Maxime> | <phoneNumber> | "245470000" <Lannion> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <Place> <Marie-Laure> | <livesIn> | <Montpellier> <Lannion> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <Thing> <Maxime> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <Person> (27 rows)
The following 5 schema triples are not generated during the saturation:
<City> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <Thing> . <phoneNumber> <http://www.w3.org/2000/01/rdf-schema#domain> <Person> . <phoneNumber> <http://www.w3.org/2000/01/rdf-schema#domain> <Thing> . <contact> <http://www.w3.org/2000/01/rdf-schema#domain> <Thing> . <livesIn> <http://www.w3.org/2000/01/rdf-schema#range> <Place> . <livesIn> <http://www.w3.org/2000/01/rdf-schema#range> <Thing> .