databases
play

Databases Picture by Jeremy Hiebert - PowerPoint PPT Presentation

Databases Picture by Jeremy Hiebert [http://www.flickr.com/photos/jeremyhiebert/] Graph Databases SPARQL and DBPedia Andr Santanch e Patrcia Cavoto Institute of Computing UNICAMP September 2015 Dinosaur Example Namespace Dino


  1. Nodes of the Reptile Class - SPARQL with namespaces ?animal rdf:type dbo:Reptile rdf:type ?animal rdf:type ?animal SELECT ?animal WHERE {?animal rdf:type dbo:Reptile}

  2. SPARQL “ a ” replacing “ rdf:type ” ?animal rdf:type dbo:Reptile rdf:type ?animal rdf:type ?animal SELECT ?animal WHERE {?animal a dbo:Reptile}

  3. Reptile Class rdfs:Class rdf:type http://dbpedia.org/ontology/Reptile rdf:type http://dbpedia.org/resource/Goniurosaurus http://dbpedia.org/resource/Goniurosaurus rdf:type http://dbpedia.org/ontology/Reptile . http://dbpedia.org/ontology/Reptile rdf:type rdfs:Class .

  4. Property Order: Dinosaur dbo:Reptile dbr:Dinosaur rdf:type dbo:order dbr:Goniurosaurus

  5. Nodes of the Reptile Class and Order Dinosaur – SPARQL dbo:Reptile dbr:Dinosaur rdf:type dbo:order ?animal SELECT ?animal WHERE {?animal rdf:type dbo:Reptile . ?animal dbo:order dbr:Dinosaur}

  6. Property fossilRange: Early_Cretaceous dbr:Early_Cretaceous dbp:fossilRange dbr:Embasaurus

  7. Nodes of the same fossilRange of the Embasaurus – SPARQL ?dino ?dino dbp:fossilRange dbp:fossilRange ?range dbp:fossilRange dbr:Embasaurus SELECT ?dinosaur WHERE {dbr:Embasaurus dbp:fossilRange ?range . ?dinosaur dbp:fossilRange ?range}

  8. Nodes of the same fossilRange of the Embasaurus – SPARQL Some Results dbr:Edgarosaurus dbr:Sauroplites dbp:fossilRange dbp:fossilRange dbr:Early_Cretaceous dbp:fossilRange dbr:Embasaurus SELECT ?dinosaur WHERE {dbr:Embasaurus dbp:fossilRange ?range . ?dinosaur dbp:fossilRange ?range}

  9. Processing the Query ▪ Process by pattern → 0..*) part of → ▫ Find [species] whose [origin] ( EUA ▪ Process by inference → ▫ Find [species] whose [origin] EUA ▫ Rules: ◦ If (A) origin (B) and (B) part of (C) => (A) origin (C) ◦ If (A) part of (B) and (B) part of (C) => (A) part of (C)

  10. Cypher MATCH (dn:Dinosaur)-[:Found]->(pl:Place) MATCH (pl)-[:Part_of*0..5]->(pl2:Place) WHERE pl2.id="USA" RETURN dn.id

  11. SPARQL

  12. Ontologia ResearchCard

  13. Propriedade rdf:type card:author rdfs:Property card:autor :Liz_Fraley :Beyond_theory

  14. Classe rdf:type card:BibliographicUnit rdfs:Class rdf:type :Beyond_theory card:BibliographicUnit

  15. Conjunto de Dados card:autor :Beyond_theory :Liz_Fraley card:autor :Configuration_Management :Christopher_Seiwald card:autor :Laura_Wingerd :Configuration_Management

  16. SELECT ?nome WHERE { ?nome rdf:type vcard:Name }

  17. SELECT ?publicacao WHERE { ?publicacao card:authors :Liz_Fraley }

  18. SELECT ?publicacao ?autor WHERE { ?publicacao card:authors ?autor }

  19. SELECT ?assunto WHERE { ?publicacao card:subjects ?assunto }

  20. SELECT ?assunto WHERE { ?publicacao card:authors :Liz_Fraley . ?publicacao card:subjects ?assunto }

  21. SELECT ?assunto WHERE { ?publicacao card:subjects ?assunto . ?assunto subj:superset subj:content_management }

  22. SELECT ?assunto WHERE { ?assunto rdf:type subj:Subject }

  23. SELECT ?assunto WHERE { ?assunto rdf:type subj:Subject . ?assunto subj:superset subj:content_management }

  24. SELECT ?assunto WHERE { ?assunto rdf:type subj:Subject . { { ?assunto subj:superset subj:content_management . } UNION { ?assunto subj:superset ?super . ?super subj:superset subj:content_management } } }

  25. Generic Examples ▪ All classes SELECT ?classe WHERE { ?classe rdf:type owl:Class } ▪ All triples (resource, property, value) SELECT ?r ?p ?v WHERE { ?r ?p ?v }

  26. SWRL ▪ Place(?pl1), Place(?pl2), Place(?pl3), partOf(? pl1, ?pl2), partOf(?pl2, ?pl3) -> partOf(?pl1, ? pl3)

  27. http://dbpedia.org/page/Eye

  28. Agradecimentos ▪ Luiz Celso Gomes Jr (professor desta disciplina em 2014) pela contribuição na disciplina e nos slides.

  29. André Santanchè http://www.ic.unicamp.br/~santanche

  30. Property Origin of the specimen Label var:origin Detail This descriptor has to be used with great precaution... property var:origin

  31. Using the Property Asia and austral isles Label var:origin taxa:V_bengalensis.html state:asia Detail The specimen CodedDescription is from Asia or the austral islands...

  32. Connected Graph ... var:origin var:origin state:asia taxa:V_bengalensis.html var:origin ...

  33. Origin in GeoNames India var:origin taxa:V_bengalensis.html http://www.geonames.org/1269750/

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend