© 2006 hewlett-packard development company, l.p. the information contained herein is subject to...

17

Upload: caitlin-laycock

Post on 01-Apr-2015

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: © 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Use Case: Populating Business Objects
Page 2: © 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Use Case: Populating Business Objects

© 2006 Hewlett-Packard Development Company, L.P.The information contained herein is subject to change without notice

Use Case:Populating Business Objects

W3C Workshop on RDF Access to Relational Databases

Andy Seaborne (HP), Damian Steer (ILRT)

Page 3: © 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Use Case: Populating Business Objects

3

Business Problem• New business process• XML objects• Data in various places

Page 4: © 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Use Case: Populating Business Objects

4

Technical Problem

? ? ?

Geographic Production

<?xml>… <site> <location>??</location> <name>??</name> <capacity>??</capacity> <history> . . . </history> </site>…

Asset & History

Page 5: © 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Use Case: Populating Business Objects

5

Technical Approach

Single SPARQL Query

Translation between domains

Databases Databases Databases

SquirrelRDF

Page 6: © 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Use Case: Populating Business Objects

6

SquirrelRDF• http://jena.sf.net/SquirrelRDF• SPARQL to SQL

−And LDAP and IMAP

• RDB Mapper−(c.f. TimBL’s Design note)

• Simple servlet• Results in SPARQL XML Results Format,

JSON, …• … and RDF.

Page 7: © 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Use Case: Populating Business Objects

7

RDB Mapper

• Automatic Generation• A map is a number of mapped classes

−Not necessarily in the same database

ex:map a db:Map ; db:mapsClass ex:People , ex:Department .

Page 8: © 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Use Case: Populating Business Objects

8

RDB Mapper : Classes

• Tables map to classes

ex:People a rdfs:Class ;

db:primaryKey ex:propA ;

db:database <jdbc:mysql://localhost/conference> ;

db:table “People" .

CREATE TABLE People ( id int, name varchar(30), PRIMARY KEY id )

Page 9: © 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Use Case: Populating Business Objects

9

RDB Mapper : Properties

ex:people_id a rdf:Property ; rdfs:domain ex:people ; db:col "id" ; db:colType "int" .

ex:people_name a rdf:Property ; rdfs:domain ex:people ; db:col "name" ; db:colType "varchar" .

CREATE TABLE People ( id int, name varchar(30), PRIMARY KEY id )

Page 10: © 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Use Case: Populating Business Objects

10

SquirrelRDF• Hard: SPARQL patterns with a property

variable−{ <id1234> ?p “foo” }

• Hard: Query over types−{ ?s rdf:type ?type }

Page 11: © 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Use Case: Populating Business Objects

11

Rules• SPARQL basic graph pattern

−point at which data is accessed in SPARQL

• BGP translation−SPARQL pattern match => calculate =>

generate pattern

−Generate pattern more than a BGP (e.g. UNION)

• Applied to query coming in• Targeting databases left to SquirrelRDF

Page 12: © 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Use Case: Populating Business Objects

12

Rules Used • Used

−Reformat a key

−Property => property

−Join across databases by key

−Multiple places for one value

• Notes−In this use case, no rewriting the query results

was necessary, but likely needed in other situations.

Page 13: © 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Use Case: Populating Business Objects

13

Summary

• Domain mapping problem is not SQL specific

− SPARQL-rewrite rules encapsulate mapping

• Direct database encapsulation− Scale, maintenance

Page 14: © 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Use Case: Populating Business Objects

14

Page 15: © 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Use Case: Populating Business Objects

15

Jena extended tools family

External bridges

GlozeXML

XML Schema

RDF

OWL

GRDDLXML

with GRDDL annotation

RDF

SquirrelRDFRDF

SPARQLRDBMS

LDAP

JosekiRDF Server

DARQdistributed

SPARQL query

Access

PortalCoreFacetted browse

Brownsauce

RDF explorer

UI

Tools

EyeballConfigurable

RDF validator

Jena Ontology API

SPARQL API

query & update

RDF API

RulesExterna

lNone

Inference

Writers

RDF/XMLN3

TurtleN-triple

Readers

RDF/XMLN3

TurtleN-triple

Graph and query (Store SPI)

MemoryFile

backed SDBSPARQL

database

RDB

Command line tools

- merge RDF- convert format

- schemagen- db load

Page 16: © 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Use Case: Populating Business Objects

16

Example: Semantic Web Environmental Directory

www.swed.org.uk

Page 17: © 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Use Case: Populating Business Objects

17

Example: Seeker – an Education Portal for the Singapore Government