Exporting Relational Data to RDF: Strategies and Considerations

Slide Note
Embed
Share

Explore the process of mapping relational data to RDF, including the choice of RDF vocabulary, defining mapping techniques, and exporting strategies. Learn about RDB systems that support RDF, direct mapping approaches, and the use of hybrid storage solutions. Discover how to bridge SPARQL and SQL for querying relational databases and generate RDF graphs seamlessly.


Uploaded on Aug 01, 2024 | 1 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. RDF and RDB 1 Some slides adapted from a presentation by Ivan Herman at the Semantic Technology & Business Conference, 2012.

  2. Mapping Relational data to RDF Suppose we have data in a relational database and want to export it as RDF 1. Choose an RDF vocabulary to represent the data 2. Define a mapping from the relational tables to RDF Then either: a) Materialize RDF triples from database using the mappings b) Use a server to dynamically access the relational data given a SPARQL query c) Use a DBMS that directly supports RDF (e.g., Oracle 11g, DB2)

  3. Some RDB systems can handle RDF Relational database vendors realize importance of the Semantic Web market Some systems have a hybrid view: Traditional, relational storage, usually coupled with SQL RDF storage, usually coupled with SPARQL Examples include Oracle 12c, IBM s DB2 and OpenLink Virtuoso Model involves exporting relational data to RDF

  4. Exporting relational data to RDF Export does not necessarily mean physical conversion for very large databases a duplication would not be an option systems may provide SPARQL SQL bridges to make queries on the fly Result of export is a logical view of the relational content

  5. Simple export: Direct Mapping Provide a canonical RDF view of relational tables Only needs the information in the RDB Schema

  6. Direct mapping approach Each column name provides a predicate ISBN Author Title Publisher Year Each row is a subject 0006511409X id_xyz The Glass Palace id_qpr 2000 0007179871 id_xyz The Hungry Tide id_qpr 2004 foreign keys refer to subjects in another table Cell values are literal objects ID Name Homepage id_xyz Ghosh, Amitav http://www.amitavghosh.com

  7. Direct mapping approach Tables RDB Schema Direct Mapping Direct Graph RDF graph generated from relational database with its schema Can automatically generate an SQL query to answer a SPARQL query that directly uses the relational DB

  8. Pros and cons of Direct Mapping Advantages of Direct mapping Simple, does not require any other concepts Know schema know RDF graph structure Know RDF graph structure good idea of schema (!) Disadvantages: Resulting may not be what application wants Except for foreign keys, all cell values become literals, i.e. strings, not things Don t want to force database to be re-designed to expose more cell values as objects

  9. Extended mapping approach Tables Direct Mapping RDB Schema Direct Graph Graph Processing (Rules, SPARQL, ) Final, Application Graph

  10. Beyond Direct Mapping: R2RML R2RML: RDB to RDF Mapping Language W3C recommendation 9/2012 Separate vocabulary to control the details of the mapping, e.g.: finer control over choice of the subject creation of URI references from cells predicates may be chosen from a vocabulary datatypes may be assigned etc. Produce final RDF graph in one step

  11. Beyond Direct Mapping: R2RML R2RML Instance RDB Schema Tables R2RML Mapping Final, Application Graph

  12. Relationships to Direct Mapping Fundamentals are similar: Each row => set of triples with common subject Direct mapping is a default R2RML mapping Which approach? depends on local tools, personal experiences and background, You can begin with a default R2RML, and gradually refine it

  13. R2RML D2RQ was a practical system first developed in 2004 that is widely used W3C formed a RDB2RDF working group in 2009 to develop a standard R2RML: RDB to RDF Mapping Language is a W3C recommendation since 2012-09-27 Several implementations are available

Related