This is part of a longer conversation.
What if I already have an OWL ontology and a populated triple store with billions of triples? How can I present denormalized dimensional data to SQL Query writers and report developers?
If you have a populated triple store with billions of triples and an OWL ontology, that’s a great start! However, bridging the gap between RDF triples (the native data model for triple stores) and denormalized dimensional data that SQL users are accustomed to can be a challenge.
Here are the steps you might follow:
- Define Your SPARQL Views: Write SPARQL queries that extract data from your RDF triple store in a way that aligns with your denormalized dimensional model. This could mean creating SPARQL CONSTRUCT queries to generate new triples, or SELECT queries that result in a table-like format. For instance, each row might represent a fact, with columns for each dimension and measure. These queries should be designed according to your OWL ontology and the needs of your report developers.
- Create Virtual SQL Views: Once you have your SPARQL views, use a technology that can create a SQL view on top of the SPARQL query results. This makes the results of your SPARQL queries look like traditional SQL tables or views. Technologies that can do this include various RDF-to-SQL mapping tools, SQL query federation tools, and certain triple store technologies. For example, OpenLink Virtuoso is a database that supports both SPARQL and SQL queries, and can create SQL views on top of SPARQL results.
- Documentation and Training: Once you have your SQL views in place, it’s important to provide good documentation and training for your SQL users. This should include an explanation of what each view represents, how the data in the view maps to your ontology, and any limitations or caveats that the users should be aware of. Users should also be trained in how to write SQL queries against these views, and how to interpret the results.
- Provide Support: Finally, ensure you have a process in place to provide ongoing support for your users. This could include answering questions, fixing bugs, and making enhancements to your views or ontology as needed.
Remember that presenting RDF data in a SQL-like way can involve some compromises. Not all aspects of your RDF data or OWL ontology may be accurately represented in a SQL-like view. In such cases, it might be beneficial to train some of your more advanced users in SPARQL and the concepts of RDF and OWL, so they can directly query and analyze your triple store when necessary.
Leave a Reply