Use of graph database with native query for OWL data storage and reasoning - Tan, Gianne Clarize (College of Engineering, University of the Philippines Diliman, 2014)
The recent rise of web data and the need for domain-specific information to be interoperable led to the standardization of ontologies into the Web Ontology Language (OWL). OWL provides specifications for representing ontology elements and defining relationships among individual elements. Given an established standard, the challenge was implementing a suitable OWL management methodology that was scalable both as a permanent storage of data and in directly inferencing information from the ontology. Current OWL data storage types range from flat files, traditional relational database to triple stores. Meanwhile, the common query language supported across storages on top of native queries is SPARQL. However, these storage types all had limitations. Flat files and pure relational database have scalability issues. Both require programmatic inferencing and need in-memory loading for imported data before being able to do a complete query. On the other hand, storage types that use SPARQL query plug-ins have translation overhead. This research explored the potential of a graph database with a native query language as a scalable permanent storage and direct retrieval of OWL data. The node-relationship-node structure of a graph database was suitable for mapping relationships between OWL elements. For instance, OWL classes and instances were treated as nodes while OWL constructs were treated as relationships. The native query language Cypher of the graph database would not require in-memory loading of the data set during execution. A Java program using Neo4j was created to load OWL files from the Leigh University Benchmark (LUBM) - 1 dataset. A set of general mapping rules of SPARQL query to Cypher query was devised and employed in this research to transform LUBM SPARQL benchmark queries. These Cypher queries were then executed against the loaded dataset. For comparison, LUBM SPARQL queries were also executed on an existing ontology repository OWLIM. Results showed that graph database storage was scalable as the query time did not degrade in increasing data. Cypher querying was able to outperform SPARQL querying by more than a hundred percent on half of the LUBM test queries. The nature of the queries generally used indexes in node ID matching and did not involve unbounded depth search. This research opened opportunities for further enhancement of storing not yet paid data in a graph database for faster query performance.