1 / 31

Graphically Querying RDF Using RDF-GL

Graphically Querying RDF Using RDF-GL.

zofia
Download Presentation

Graphically Querying RDF Using RDF-GL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Graphically Querying RDF Using RDF-GL This talk is based on the paper RDF-GL: A SPARQL-Based Graphical Query Language for RDF. Hogenboom, F.P., Milea, D.V., Frasincar, F. & Kaymak, U. (2010). In Y. Badr, A. Abraham, A.-E. Hassanien & R. Chbeir (Eds.), Emergent Web Intelligence: Advanced Information Retrieval (Advanced Information and Knowledge Processing) (pp. 87-116). Springer London. Dutch-Belgian Database Day 2010 (DBDBD 2010)

  2. Introduction Increasing amount of information Querying large databases quickly and efficiently is desired This need is addressed by several tools and languages However, intuitiveness is often of less importance (expressivity over clarity) Dutch-Belgian Database Day 2010 (DBDBD 2010)

  3. Graphical Query Languages Enable users to create queries by arranging and connecting symbols on a canvas Build on existing textual query languages Abstract away from difficult syntax and hence aim to enhance intuitiveness Coverage of textual equivalents vs. maintaining usability Available for semi-structured representations such as XML, but no SPARQL-based GQL for RDF RDF-GL is a GQL for a SPARQL subset Dutch-Belgian Database Day 2010 (DBDBD 2010)

  4. RDF-GL • Covers most SPARQL SELECT queries • No support for: • Prologue: BASE and PREFIX • Query type: ASK, CONSTRUCT, DESCRIBE • REDUCED, FROM, NAMED, GRAPH • However, the design of the language allows for extension • Based on SPARQL and not on SPARQL 1.1 Dutch-Belgian Database Day 2010 (DBDBD 2010)

  5. RDF-GL: Example (1) PREFIX j.1: <http://www.daml.org/2003/09/factbook/factbook-ont#> SELECT DISTINCT ?name ?oil WHERE { ?country j.1:localShortCountryName ?name . ?country j.1:grossDomesticProductPerCapita ?gdp . { FILTER (?gdp < 1500) . } UNION { FILTER (?gdp > 2500) . } OPTIONAL { ?country j.1:oilProvedReserves ?oil . } } ORDER BY ASC(?gdp) Dutch-Belgian Database Day 2010 (DBDBD 2010)

  6. RDF-GL: Example (2) Dutch-Belgian Database Day 2010 (DBDBD 2010)

  7. RDF-GL: Basic Elements { , } Dutch-Belgian Database Day 2010 (DBDBD 2010)

  8. RDF-GL: Mapping to SPARQL (1) PREFIX j.1: <http://www.daml.org/2003/09/factbook/factbook-ont#> SELECT DISTINCT ?elevation WHERE { ?country j.1:elevation ?elevation . } ORDER BY DESC(?elevation) OFFSET 5 LIMIT 4 Query type and sequence modifiers Dutch-Belgian Database Day 2010 (DBDBD 2010)

  9. RDF-GL: Mapping to SPARQL (2) FILTER (?gdp > 1250) . Filters j.1:EthnicGroup rdfs:subClassOf ?class . Triples Dutch-Belgian Database Day 2010 (DBDBD 2010)

  10. RDF-GL: Mapping to SPARQL (3) ?country j.1:highwaysTotal ?hw . { FILTER (?hw < 20000) . } UNION { FILTER (?hw > 150000) . } Unions Options OPTIONAL { ?country j.1:heliports ?heli . } Dutch-Belgian Database Day 2010 (DBDBD 2010)

  11. RDF-GL: Mapping to SPARQL (4) ?country j.1:highwaysTotal ?hw . { FILTER (?hw < 20000) . } UNION { FILTER (?hw > 150000) . OPTIONAL { ?country j.1:heliports ?heli . } } Nesting Dutch-Belgian Database Day 2010 (DBDBD 2010)

  12. RDF-GL: Converting to SPARQL • Generate default PREFIXes (RDF, RDFS, XSD, etc.) • Determine query TYPE • Generate WHERE clause: • Convert all arrows and their connected boxes to triples • Add triples not connected to UNIONs or OPTIONALs to query • Add UNION and OPTIONAL circles and their children to query recursively • Determine ORDER BY • Determine LIMIT and OFFSET Dutch-Belgian Database Day 2010 (DBDBD 2010)

  13. Implementation: SPARQLinG (1) Dutch-Belgian Database Day 2010 (DBDBD 2010)

  14. Implementation: SPARQLinG (2) Dutch-Belgian Database Day 2010 (DBDBD 2010)

  15. Experiments (1) • Query the CIA World Factbook for countries which have an import or export to neighbors worth more than $10 billion a year • The query needs to return: • The names of both the countries and their neighboring trading partners • The percentages of imports and exports • Optionally the inflation rate of the neighboring partners • Only the first 20 results are desired and should be ordered by country name (ascending) Dutch-Belgian Database Day 2010 (DBDBD 2010)

  16. Experiments (2) PREFIX j.1: <http://www.daml.org/2003/09/factbook/factbook-ont#> SELECT DISTINCT ?nameC ?nameN ?percentExp ?percentImp ?inflation WHERE { ?country j.1:conventionalShortCountryName ?nameC . ?country j.1:border ?border . ?border j.1:country ?neighbor . ?neighbor j.1:conventionalShortCountryName ?nameN . ?country j.1:exportPartner ?partnerExp . ?partnerExp j.1:percent ?percentExp . ?partnerExp j.1:country ?neighbor . ?country j.1:importPartner ?partnerImp . ?partnerImp j.1:percent ?percentImp . ?partnerImp j.1:country ?neighbor . { ?country j.1:imports ?imports . FILTER (?imports > 10000000000) . } UNION { ?country j.1:exports ?exports . FILTER (?exports > 10000000000) . } OPTIONAL { ?neighbor j.1:inflationRate ?inflation . } } ORDER BY ASC(?nameC) LIMIT 20 Dutch-Belgian Database Day 2010 (DBDBD 2010)

  17. Experiments (3) Dutch-Belgian Database Day 2010 (DBDBD 2010)

  18. Experiments (4) • The creation of RDF-GL queries is not necessarily faster than the creation of SPARQL queries • However, the GQL and tool offer: • Overview • Easy reuse of variables • Maintenance Dutch-Belgian Database Day 2010 (DBDBD 2010)

  19. Order Dependency in SPARQL SELECT ?name ?alias WHERE { ?x foaf:name ?name . OPTIONAL { ?x foaf:nick ?alias . } OPTIONAL { ?x foaf:mbox ?alias . } } SELECT ?name ?alias WHERE { ?x foaf:name ?name . OPTIONAL { ?x foaf:mbox ?alias . } OPTIONAL { ?x foaf:nick ?alias . } } • OPTIONAL is not commutative, causing problems when sharing variables in OPTIONAL clause: • We need a binary OPTIONAL operator which is commutative and associative Dutch-Belgian Database Day 2010 (DBDBD 2010)

  20. Discussion • AND-relationship is implicit, OR-relationship is explicit • Issues: • No coverage for the complete SPARQL language • Determining statement order is difficult • Solutions: • Extend language by using: • Extra symbols • Extra colors/shadings • Extra shapes • Add numbers for ordering, make use of the horizontal or vertical position of elements, etc. Dutch-Belgian Database Day 2010 (DBDBD 2010)

  21. Conclusions • RDF-GL is a GQL for SPARQL • The GQL covers a subset of SPARQL (i.e., almost all SELECT queries) • Future work: • Implement a way to determine query order • Extend the language to include more of SPARQL, i.e., • Visualization: • Widget size indicating importance • Lay-out algorithm • SPARQL to RDF-GL conversion Dutch-Belgian Database Day 2010 (DBDBD 2010)

  22. Questions Dutch-Belgian Database Day 2010 (DBDBD 2010)

  23. Appendix: EBNF non-terminals (1) Dutch-Belgian Database Day 2010 (DBDBD 2010)

  24. Appendix: EBNF non-terminals (2) Dutch-Belgian Database Day 2010 (DBDBD 2010)

  25. Appendix: EBNF non-terminals (3) Dutch-Belgian Database Day 2010 (DBDBD 2010)

  26. Appendix: EBNF non-terminals (4) Dutch-Belgian Database Day 2010 (DBDBD 2010)

  27. Appendix: EBNF non-terminals (5) Dutch-Belgian Database Day 2010 (DBDBD 2010)

  28. Appendix: EBNF non-terminals (6) Dutch-Belgian Database Day 2010 (DBDBD 2010)

  29. Appendix: EBNF terminals (1) Dutch-Belgian Database Day 2010 (DBDBD 2010)

  30. Appendix: EBNF terminals (2) Dutch-Belgian Database Day 2010 (DBDBD 2010)

  31. Appendix: EBNF terminals (3) Dutch-Belgian Database Day 2010 (DBDBD 2010)

More Related