Alexandre Bertails, <bertails@w3.org>
Eric Prud'hommeaux, <eric@w3.org>
Health Care & Life Sciences IG, <public-semweb-lifesci@w3.org>
This talk: <http://w3.org/brief/MjQx>
View the world's data in the SemWeb.
foaf:givenName
.This talk: <http://w3.org/brief/MjQx>
This talk: <http://w3.org/brief/MjQx>
http://someheathprovider.example/patientVisits/C1
provider:C1 role:patient provider:P1 .
ISO 8601 datetimes
provider:P1 role:birthdate "1946-11-03"^^xsd:date .
PK | → Address(ID) | |
---|---|---|
ID | fname | addr |
7 | Bob | 18 |
8 | Sue | NULL |
PK | ||
---|---|---|
ID | city | state |
18 | Cambridge | MA |
<People/ID=7> <People#ID> 7 . <People/ID=7> <People#fname> "Bob" . <People/ID=7> <People#addr> <Addresses/ID=18> . <People/ID=8> <People#ID> 8 . <People/ID=8> <People#fname> "Sue" . <Addresses/ID=18> <Addresses#ID> 18 . <Addresses/ID=18> <Addresses#city> "Cambridge" . <Addresses/ID=18> <Addresses#state> "MA" .
<People#fname>
vs. foaf:name
.<People/ID=7> <People#ID> 7 . <People/ID=7> <People#fname> "Bob" . <People/ID=7> <People#addr> <Addresses/ID=18> . <People/ID=8> <People#ID> 8 . <People/ID=8> <People#fname> "Sue" . <Addresses/ID=18> <Addresses#ID> 18 . <Addresses/ID=18> <Addresses#city> "Cambridge" . <Addresses/ID=18> <Addresses#state> "MA" .
The semantics align well, but implementations focus on different use case optimizations.
PREFIX :mydb <http://cityhospital.example/dbs> CONSTRUCT { ?o a study:SubjectObservation . ?o study:subject ?p . ?o study:clinician ?d . ?d :foaf:name ?dName }
WHERE { ?o mydb:patient ?p . ?o mydb:doctor ?d . ?d mydb:name ?dName }
What makes data sharable?
SELECT (f(?foo) AS ?bar)
addresses some identifier divergence.
PREFIX uni: <http://purl.uniprot.org/uniprot/> ?target <Protein#uniprot> ?ulabel . BIND (IRI(CONCAT(uni:, ?ulabel)) AS ?uniprotID)
CREATE VIEW foo ( SELECT genes.id AS gene, labels.text AS label FROM genes JOIN lables ON genes.label = lables.id )
CONSTRUCT { ?gene uniprot:id ?id ; skos:prefLabel ?gene_symbol } WHERE { _:gene Ugene:acc ?id ; Ugene:val ?gene_symbol }
SELECT ?o ?d WHERE { ?o study:subject <Bob> . <Bob> study:clinician ?d . }
SELECT ?o ?d WHERE { ?o mydb:onPatient <Bob> . ?o mydb:byDoctor ?d . }
SELECT observations... doctors... FROM observations, patients ON id=observations.patient ... WHERE patients.name = "Bob"
How easy will it be to turn a query over the above graph
into an SQL query over the input tables?
SELECT ?name WHERE { ?who db:name "Bob" . ?who db:manager ?boss . ?boss db:name ?name . }
SELECT boss.name FROM Employees AS who INNER JOIN Employees AS boss ON boss.id=who.manager WHERE who.name="Bob"
A foaf:know B. B foaf:knows C.
requires 2 X ?x foaf:knows ?y
BIND (IRI(CONCAT(uni:, ?ulabel)) AS ?uniprotID)
Resolve as much as possible;
huge impact on performance.
{ <http://www.uniprot.org/uniprot/P04637> skos:prefLabel ?symbol }
=>
SELECT (fn:lower-case(?_uniProt_0_u_gene_symbol) AS ?symbol)
WHERE {
_:_uniProt_0_gene <http://ucsc.example/uniProt/gene#acc> "P04637" .
_:_uniProt_0_gene <http://ucsc.example/uniProt/gene#val> ?_uniProt_0_u_gene_symbol .
}
=>
SELECT TOLOWER(uniProt.val) AS ?symbol FROM uniProt WHERE acc = "P04637"
SELECT TOLOWER(uniProt.val) AS ?symbol FROM uniProt WHERE CONCAT("http://www.uniprot.org/uniprot/", uniprot.acc) = "http://www.uniprot.org/uniprot/P04637"
Resolve as deeply as possible.
CONCAT("a", ?b, "c", ?d) = "a123bxyz"
: → regexp("a(.*?)c(.*?)")?a + ?b = 3
fn:upper-case(?s) = "ASDF"