
RDF-to-RDF and RDF-to-relational query transformation in SWObjects.
When: 18 Feb 0900EST, 1400Z
Phone bridge: +1.617.761.6200 #4562
Irc: irc.w3.org:6665 #swobjects
This work is licensed under a
Creative Commons Attribution 3.0 License,
with attribution to W3C.
General purpose SPARQL engine.
SPARQL --username eric --password ********
-d http://www.w3.org/2000/09/dbwg/details?group=38539
-d http://cgi.w3.org/member-bin/list_mgnt.pl?list=public-semweb-lifesci
-e 'SELECT ?mem { { ?w <http://xmlns.com/foaf/0.1/mbox> ?mem }
MINUS { ?l <http://cgi.w3.org/member-bin/list_mgnt_xml.pl#member> ?mem } }'
works as a general tool, like cwm.
default interaction is through trig
{ # default graph }
<namedGraph1 { ... }
<namedGraph2 { ... }
and a UTF-8 variant of result sets
| ?mem |
|---|
| <mailto:arabans@ccf.org> |
| <mailto:batchelorc@rsc.org> |
| <mailto:vijay.bulusu@pfizer.com> |
a couple cute tricks:
~/checkouts/swobjects/bin/SPARQL --help
Usage: SPARQL [opts] queryURI mapURI*
Usage: SPARQL [opts] -e query mapURI*
get started with: SPARQL --Help tutorial
...
SPARQL --Help tutorial
Tutorial
...
SPARQL -a -DG foo -G foo2 -e "SELECT ?g {GRAPH ?g {?s ?p <http://usefulinc.com/ns/doap#Project>}}"
+--------+
| ?g |
| <foo> |
| <foo2> |
+--------+
trivial to dump RDB as RDF
test: is the graph query coherent (do generated node identifiers merge)?
Sociopathic RDF graph
?who mydb:fn ?name
Need interface graph
?who foaf:name ?name
The charter says to map RDBs to RDF/OWL.
clear algebra for:
| id | manager | section |
|---|---|---|
| 1 | 4 | sales |
| 4 | NULL | exec |
Emp:id=1 emp:id 1 .
Emp:id=1 emp:manager Emp:id=4 .
Emp:id=1 emp:section "sales" .
Emp:id=4 emp:id 4 .
Emp:id=4 emp:manager "exec" .
| employee | lead | name |
|---|---|---|
| 1 | 4 | widgets |
| 4 | 5 | widgets |
_:t1 task.employee Emp:id=1 . _:t1 task.lead Emp:id=2 . _:t1 task.name "widgets" . _:t2 task.employee Emp:id=4 . _:t2 task.lead Emp:id=5 . _:t2 task.name "widgets".
SELECT ?sec ?name
WHERE { GRAPH<HQ> { ?flunky emp:section ?sec OPTIONAL { ?flunky emp:manager ?boss } }
GRAPH<Sales> { _:t task:employee ?flunky; task:lead ?boss; task:name ?task } }
| flunky | boss | sec | task |
|---|---|---|---|
| Emp:id=1 | Emp:id=4 | "sales" | "widgets" |
| Emp:id=4 | "exec" | "widgets" |
| flunky | boss | sec | task |
|---|---|---|---|
| 1 | 4 | sales | widgets |
Useful for:
requirements feedback through:
| system | expressivity | |
|---|---|---|
| Virtuoso | d2r/DDL | |
| Triplify | SQL->app? | |
| D2R | d2r | |
| Metatomix | GUI | |
| Ultrawrap | DDL | |
| Oracle | DDL | |
| SWObjects | CONSTRUCT | |
| OKKAM | ??? |
