SPARQL and Inference: Flexibility and Machine Smarts
of data live in RDF ontologies. But why is it any better there than in traditional and more mature relational databases, which developers can work with more easily. You already know that ontologies make it easy to share data, but they offer two more benefits that you may not be aware of:
- More flexible querying with SPARQL
- Inference, a machine-learning process borrowed from artificial intelligence
SPARQL is a W3C-recommended querying language for RDF-based models. It works on matching patterns in the RDF graphs and therefore turns what was a potentially mind-boggling series of awkward joins in a relational database into a single, (mostly) easy-to-write query.
Inference is a process of machine learning where if you have the following facts:
- Fact 1: If A is true, then B is true.
- Fact 2: If B is true, then C is true.
Then the machine figures out (or infers) that if A is true, then C is true.
|The benefits of SPARQL and inference are priceless for business intelligence.|
Without inference, you just have two facts (Fact 1 and Fact 2), but with inference your application can process the logical consequence of those two facts and provide one or more new pieces of data. Many such logical constructs exist today, and when the data is structured in a logical way that lends itself to inference, they can produce new data.
Obviously, the benefits of SPARQL and inference are priceless for business intelligence, as having more information about the customers, products, and the operating space can help an organization deliver a better product. The trick is to architect the data structures and the ontologies for not only easy retrieval, but also for logical inference.
As promising as SPARQL and inference may are, they are both notoriously slow, especially when working with large data sets. So the application designer must have the use case and the application user in mind when choosing to use these tools.
Semantic Web, a Fine Work in Progress
Technologies related to the Semantic Web are very powerful, but they are still in the early stages of adaptation by the business community. Each technology has its shortcomings, and they all carry the overhead of being new and requiring an often steep learning curve. Because the Semantic Web stack is a relatively advanced computer science topic, few developers today have the skills to work with the technologies and so wide adaptation remains a long-term challenge.
All this makes Semantic Web applications more expensive to build and maintain. So when planning to build a Semantic Web application or even an application that simply uses some of its technologies rather than participating in the greater Semantic Web, the application designer must consider a much more sophisticated and forward-thinking set of use cases than when he or she would when designing a traditional application.