1 / 19

A SQL-based Approach for Mapping Relational Data to RDF

A SQL-based Approach for Mapping Relational Data to RDF. Souripriya Das and Seema Sundara Database Semantic Technologies Group, Oracle.

nardo
Download Presentation

A SQL-based Approach for Mapping Relational Data to RDF

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A SQL-based Approach for Mapping Relational Data to RDF Souripriya Das and Seema Sundara Database Semantic Technologies Group, Oracle

  2. THE FOLLOWING IS INTENDED TO OUTLINE OUR GENERAL PRODUCT DIRECTION. IT IS INTENDED FOR INFORMATION PURPOSES ONLY, AND MAY NOT BE INCORPORATED INTO ANY CONTRACT. IT IS NOT A COMMITMENT TO DELIVER ANY MATERIAL, CODE, OR FUNCTIONALITY, AND SHOULD NOT BE RELIED UPON IN MAKING PURCHASING DECISION. THE DEVELOPMENT, RELEASE, AND TIMING OF ANY FEATURES OR FUNCTIONALITY DESCRIBED FOR ORACLE'S PRODUCTS REMAINS AT THE SOLE DISCRETION OF ORACLE. 2

  3. Architecture Diagram for RDB2RDF processing SPARQL to SQL translator SPARQL query SQL query QueryWriter Mapping RDF concepts to DB objects RDF schema for query writing Mapping Language Processor SQL Language Processor RelationalDatabase RDB2RDF Mapper SQLstatements Mapping Specification ClientSide Source Database

  4. Overview Basis for defining an RDFS/OWL class and its properties based on relational data stored in a source database: A SQL query specifying arbitrary transformation of source relational data Related foreign and unique (or primary) key constraint definitions. • Client side capabilities may vary • Strong-DB: An RDBMS with support for Views and Constraints on Views. (Example: Oracle database server) • No-DB: Only connects to database using JDBC or ODBC. • Proposed mapping language (Leverage SQL on source database and if available, SQL on client side) • Strong-DB No new language. Employ some conventions with SQL (e.g., when naming Views, View cols, and constraints). • No-DB  Simple language to specify mapping between RDF classes, properties and SQL queries, query projections, constraints.

  5. status- based classes job- based classes c_prm_empno c_ref_deptno empno ename job deptno InstURI etype rdf:type rdf:type 100 John R&D 11 <100> part <part> 200 Jane R&D 11 <200> full <full> 300 Brad R&D 22 <300> intrn <intrn> 400 Glen Sales 33 <400> full <full> 500 Kurt Sales 44 <500> full <full> class DB View  RDF Class and Properties

  6. ‘<xyz.com/dept/’ || deptno || ‘>’ InstURI , deptno “<xyz.com/dept/deptno>” , dname “<xyz.com/dept/Name>” , loc “<xyz.com/dept/Location>” ALTER VIEW “<xyz.com/dept>”add constraint “<xyz.com/dept/c_unq_deptno>” unique (“<xyz.com/dept/deptno>”) disable novalidate; Unique Key Example: DEPT view defines Class and Properties CREATE VIEW “<xyz.com/dept>” AS SELECT FROM dept

  7. ‘<xyz.com/emp/’ || empno || ‘>’ InstURI , empno “<xyz.com/emp/empno>” , ename “<xyz.com/emp/Name>” , ‘<xyz.com/emp/job/’ || job || ‘>’ “rdf:type” , job “<xyz.com/emp/job>” “<xyz.com/emp/deptNum>” , deptno ALTER VIEW “<xyz.com/emp>”add constraint “<xyz.com/emp/c_prm_empno>”primary key (“<xyz.com/emp/empno>”) disable novalidate; primary Key foreign Key ALTER VIEW “<xyz.com/emp>”add constraint “<xyz.com/emp/c_ref_deptno>”foreign key (“<xyz.com/emp/deptNum>”) references “<xyz.com/dept>” (“<xyz.com/dept/deptno>”) disable novalidate; Example: EMP view defines Class and Properties CREATE VIEW “<xyz.com/emp>” AS SELECT emp FROM

  8. CREATE VIEW “<xyz.com/emp>” AS SELECT ‘<xyz.com/emp/’ || empno || ‘>’ InstURI , empno “<xyz.com/emp/empno>” , ename “<xyz.com/emp/Name>” , ‘<xyz.com/emp/job/’ || job || ‘>’ “<xyz.com/emp/job/rdf:type>” , job “<xyz.com/emp/job>” “<xyz.com/emp/deptNum>” , deptno , ‘<xyz.com/emp/etype/’ || etype || ‘>’ “<xyz.com/emp/etype/rdf:type>” , etype “<xyz.com/emp/etype>” emp FROM ALTER VIEW “<xyz.com/emp>”add constraint “<xyz.com/emp/c_prm_empno>”primary key (“<xyz.com/emp/empno>”) disable novalidate; foreign Key primary Key ALTER VIEW “<xyz.com/emp>”add constraint “<xyz.com/emp/c_ref_deptno>”foreign key (“<xyz.com/emp/deptNum>”) references “<xyz.com/dept>” (“<xyz.com/dept/deptno>”) disable novalidate; Example: EMP view with multiple rdf:type columns

  9. “<xyz.com/emp/job/rdf:type>” rdfs:subPropertyOf rdf:type “<xyz.com/emp/etype/rdf:type>” Subproperties of rdf:type

  10. SPARQL Query: Involving generic rdf:type ?x ?ename SELECT WHERE { ?x <xyz.com/emp/Name> ?ename . ?x rdf:type <xyz.com/emp/job/SALES> } SELECT e.instURI x , e.“<xyz.com/emp/Name>” ename FROM “<xyz.com/emp>” e e.“<xyz.com/emp/job/rdf:type>” = “<xyz.com/emp/job/SALES>” WHERE e.“<xyz.com/emp/etype/rdf:type>” = “<xyz.com/emp/job/SALES>” or Oracle Confidential

  11. Prefix-based DB identifiers (stay within length-limits) RDF_PREFIX_MAP$ • ADD Unique constraint (View, Prefix) • ADD Unique constraint (View, Expansion)

  12. ‘<xyz.com/emp/’ || empno || ‘>’ InstURI ‘<xyz.com/dept/’ || deptno || ‘>’ InstURI , empno “emp:empno” , deptno “dept:deptno” , ename “emp:Name” , ‘<xyz.com/emp/job/’ || job || ‘>’ , dname “rdf:type” “dept:Name” , loc , job “emp:job” “dept:Location” “emp:deptNum” , deptno No DB: <ViewName, SQLdefString> info SELECT FROM dept SELECT emp FROM

  13. No DB: View Constraint info

  14. No DB: <ViewName, ColPos, Property> info

  15. No DB: A simple syntax for Classes

  16. No DB: A simple syntax for Properties1 • 1 Inverse function specification for properties not shown, but can be added easily. • Range information can be derived from type info obtained from SQL engine at source database.

  17. No DB: A simple syntax for Constraints

  18. Summary InstURI InstURI properties properties class class constraints Projections Projections SELECT SELECT FROM FROM WHERE WHERE View View SQL query SQL query Group By Group By Having Having … … • Proposed mapping language (Leverage SQL on source database and if available, SQL on client side) • Strong-DB No new language. Employ some conventions with SQL (e.g., when namingViews, View cols (projections), and constraints). • No-DB Simple language to specify mapping between RDF classes, properties and SQL queries, query projections, constraints.

  19. Oracle Confidential

More Related