Using Reasoning and Inference to Drive Faceted Browsing UI -- Part 1

As part of its rich collection of tools for productive interaction with data it manages, Virtuoso a built-in Faceted Browser Engine that enables Data Exploration informed by Entity Relationship Type (Relations) Semantics and Aggregation. Thus, the membership of a relation is an important indicator for query solution filtering and general data exploration.

A major feature of the faceted browser engine’s user interface (UI) lies in its ability to handle the aesthetic challenges associated with using hyperlinks as entity identifiers (names) by replacing raw HTTP URIs with labels. This powerful feature is future enhanced by the use of built-in inference rules based on key annotation oriented entity relations such as rdfs:label, schema:name, dcterms:title etc…

Given a Faceted Browser Instance, and Relations generated from a SQL RDBMS to RDF Views mapping endeavor, simply insert the following relations into a Virtuoso Quad Store hosted Document (or Named Graph) to alter the behavior of the Faceted Browser, dynamically using SPARQL.


SPARQL

INSERT
   {  GRAPH <urn:rdbms:inference:reasoning:demo:labels>
         {
            ?s   foaf:name   ?name   .
         }
   }
WHERE
   {
      ## Person Class Instances
  
      {  GRAPH <urn:demo.openlinksw.com:OracleHR>
         {
             ?s   <http://demo.openlinksw.com/schemas/OracleHR/first_name>   ?fname   ;
                  <http://demo.openlinksw.com/schemas/OracleHR/last_name>    ?sname   .
             bind (concat(?fname,' ', ?sname) as ?name)
         }
      }
  
   UNION
  
      {  GRAPH <urn:demo.openlinksw.com:ingres>
         {
             ?s   <http://demo.openlinksw.com/schemas/ingres/name>   ?name   .
         }
      }
  
   UNION
  
      {  GRAPH <urn:demo.openlinksw.com:informix>
         {
             ?s   <http://demo.openlinksw.com/schemas/informix/fname>   ?fname   ;
                  <http://demo.openlinksw.com/schemas/informix/lname>   ?sname   .
             bind (concat(?fname,' ', ?sname) as ?name)
         }
      }
  
   UNION
  
      ## Oragnization Class Instances
  
      {  GRAPH <urn:demo.openlinksw.com:Demo>
         {
             ?s   <http://demo.openlinksw.com/schemas/Demo/companyname>   ?name   .
         }
      }
  
   UNION
     
      {  GRAPH <urn:demo.openlinksw.com:SQLServer>
         {
             ?s   <http://demo.openlinksw.com/schemas/SQLServer/companyname>   ?name   .
         }
      }
  
   UNION

      {  GRAPH <urn:demo.openlinksw.com:progress9>
         {
             ?s   <http://demo.openlinksw.com/schemas/progress9/name>   ?name   .
         }
      }
  
   UNION
  
      {  GRAPH <urn:demo.openlinksw.com:sybase12>
         {
            ?s   <http://demo.openlinksw.com/schemas/sybase12/pub_name>   ?name   .
         }
      }

   UNION

      {  GRAPH <urn:demo.openlinksw.com:prestoDB>
         {
            ?s   <http://demo.openlinksw.com/schemas/PrestoDB/c_name>   ?name   .
         }
      }
   };

Setup a Built-In Inference Rule

RDFS_RULE_SET
  ( 'urn:sql:rdbms:inference:reasoning:rules:labels' ,
    'urn:rdbms:inference:reasoning:demo:labels'
  ) ;

Test Effects of Reasoning & Inference