RDF Semantic Graph Feature Request - SPIN Inference
Last updated on JUNE 26, 2017
Applies to:Oracle Spatial and Graph - Version 18.104.22.168 and later
Information in this document applies to any platform.
Enhancement Request: SPIN inference
SPIN is a W3C Member Submission that has become the de-facto industry standard to represent SPARQL rules and constraints on Semantic Web models. SPIN also provides meta-modeling capabilities that allow users to define their own SPARQL functions and query templates. Finally, SPIN includes a ready to use library of common functions.
What You Can Do with SPIN
SPIN is a way to represent a wide range of business rules.
You will not need to learn another proprietary rules language to do so. With SPIN, rules are expressed in SPARQL. In fact, SPIN is also referred to as SPARQL Rules. SPARQL is a well-established W3C standard implemented by many industrial-strength RDF APIs and all databases. This means that rules can run directly on RDF data without a need for “materialization”. SPIN provides a framework that helps users to leverage the fast performance and rich expressivity of SPARQL for various application purposes.
SPIN can be used to:
Calculate the value of a property based on other properties - for example, area of a geometric figure as a product of its height and width, age of a person as a difference between today's date and person's birthday, a display name as a concatenation of the first and last names
Isolate a set of rules to be executed under certain conditions - for example, to support incremental reasoning, to initialize certain values when a resource is first created, or to drive interactive applications
These rules are implemented USING SPARQL CONSTRUCT or SPARQL UPDATE requests (INSERT and DELETE). SPIN Templates also make it possible to define such rules in higher-level domain specific languages so that rule designers do not need to work with SPARQL directly.
Another common need in applications is to check validity of the data. For example, you may want to require that a field is entered and/or that the string entered follows your format requirements.
SPIN offers a way to do constraint checking with closed world semantics and automatically raise inconsistency flags when currently available information does not fit the specified integrity constraints. Constraints are specified using SPARQL ASK or CONSTRUCT queries, or corresponding SPIN Templates.
SPIN combines concepts from object oriented languages, query languages, and rule-based systems to describe object behavior on the web of data. One of the key ideas of SPIN is to link class definitions with SPARQL queries to capture rules and constraints that formalize the expected behavior of those classes. To do so, SPIN defines a light-weight collection of RDF properties.
Finally, SPIN also supports the definition of new SPARQL functions with a transparent and web-friendly framework.
The SPIN Modeling Vocabulary is a light-weight collection of RDF properties and classes to support the use of SPARQL to specify rules and logical constraints. Based on an RDF representation of SPARQL queries, SPIN defines three class description properties: spin:constraint can be used to define conditions that all members of a class must fulfill. spin:rule can be used to specify inference rules using SPARQL CONSTRUCTs and DELETE/INSERTs. spin:constructor can be used to initialize new instances with default values. In addition to these class description properties, SPIN provides a powerful meta-modeling capability that can be used to build your own modeling language and SPARQL extensions. These meta-modeling features provide the ability to encapsulate reusable SPARQL queries into templates, and to derive new SPARQL functions as well as magic properties (aka property functions) from other SPARQL queries and functions.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms