Knowledge Graphs course 2025, 7 March 2025
SELECT ?drug ?title WHERE {
?drug db:drugCategory dbc:micronutrient.
?drug db:casRegistryNumber ?id.
?keggDrug rdf:type kegg :Drug.
?keggDrug bio2rdf:xRef ?id.
?keggDrug purl:title ?title.
}
SELECT ?drug ?title WHERE {
SERVICE <http://example.com/drb> {
?drug db:drugCategory dbc:micronutrient.
?drug db:casRegistryNumber ?id.
}
SERVICE <http://example.com/kegg> {
?keggDrug rdf:type kegg :Drug.
?keggDrug bio2rdf:xRef ?id.
?keggDrug purl:title ?title.
}
}
SELECT ?name WHERE {
<https://alice.pods.org/profile#me>
foaf:knows ?person.
?person foaf:name ?name.
}
[ { "name": "Bob" }, { "name": "Carol" } ]| https://alice.pods.org/profile |
| https://alice.pods.org/profile |
https://alice.pods.org/profile to queue| https://alice.pods.org/profile |
| https://bob.pods.org/profile |
| https://carol.org/ |
</profile#me> :knows <https://bob.pods.org/profile#me>, <https://carol.org/#i>.No need to re-add link to https://alice.pods.org/profile
| https://bob.pods.org/profile |
| https://carol.org/ |
| https://bob.pods.org/profile |
| https://carol.org/ |
https://bob.pods.org/profile| https://bob.pods.org/profile |
| https://carol.org/ |
</profile#me> :name "Bob"; :email <mailto:bob@mail.org>; :telephone "0499 12 34 56".mailto:bob@mail.org is not an HTTP(S) link that can be followed
| https://carol.org/ |
| https://carol.org/ |
https://carol.org/| https://carol.org/ |
</#i> :name "Carol"; :email <mailto:i@carol.org>; :telephone "0499 11 22 33".
SELECT ?name WHERE {
<https://alice.pods.org/profile#me> foaf:knows ?person.
?person foaf:name ?name.
}
https://alice.pods.org/profile:
✅ </profile#me> :knows <https://bob.pods.org/profile#me>. ✅ </profile#me> :knows <https://carol.org/#i>. ❌ </profile#me> :likes <https://bob.pods.org/posts/hello-world>.
rdf:type) are deprioritized