1 / 25

A Comparison of RDF Query Language

A Comparison of RDF Query Language. Peter Haase, Jeen Brokstra, Andreas Eberhart, Raphael Volz, Proceedings of the Third International Semantic Web Conference, Hiroshima, Japan, 2004 ,University of Karlsruhe. DBLab 고명석. Contents. Introduction Language Dimensions Query Language Usecases

ron
Télécharger la présentation

A Comparison of RDF Query Language

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. A Comparison of RDF Query Language Peter Haase, Jeen Brokstra, Andreas Eberhart, Raphael Volz, Proceedings of the Third International Semantic Web Conference, Hiroshima, Japan, 2004 ,University of Karlsruhe DBLab 고명석

  2. Contents • Introduction • Language Dimensions • Query Language • Usecases • Conclusion

  3. Introduction • Resource Description Framework • Standard for data representation and exchange on the Semantic Web • We present a comparison of six representative query language for RDF

  4. Language Dimensions • The requirement on a RDF query language • RDF abstract data model • Independent of a concrete serialization syntax • Formal semantic and Inference • Formal semantic provide a dependable basis for reasoning about the meaning of an RDF graph • Support for XML schema data type • Represent data value in RDF • Free support for making statement about resource • Complete information about any resource is available in the RDF query

  5. Query Language • RQL • OQL-like syntax • Use select-from-where filter • Relies on a formal graph model • RQL implemented • ICS_FORTH’s RDF Suite • Sesame system Select Pub From {Pub} ns3:year {y} Where y = “2004” Using namespace ns3=……

  6. Query Language • SeRQL • Stand for Sesame RDF Query Language • Syntax is similar to RQL • Supports generalized path expression SELECT * FROM {R} <rdfs:label> {L} WHERE L like "*john*"

  7. Query Language • TRIPLE • Goal • use various semantics in one inference • Information integration • The language is derived from F-Logic • subject[predicateobject] FORALL X  ( X[rdfs:label]  “foo”])@default:in • return all resource which have a label “foo”

  8. Query Language • RDQL • A simple SQL-style language • The language used by RDF Gateway applications and agents Select ?p Where (?p, <rdfs:label>, “foo”) • Collects all resource with label “foo”

  9. Query Language • N3 • Notation3 provides a text-based syntax for RDF • N3 supported by • Euler • CWN ?y rdfs:label “foo” => ?y a:QueryResult • Collects all resource with label “foo”

  10. Query Language • Versa • Basic form • ListExpr – ListExpr  BoolExpr • Return a list of all objects of matching triples All() – rdfs:label  * • Return a list containing all labels All() |- rdfs:label  eq(“foo”) • Yield all resource having the label “foo”

  11. Usecases • Simple Data • “-” : no support, • “●” : full support • “○” : partial support

  12. Usecase Graph • Path Expression • Optional Path Expression • RDF provide means to deal with irregularities and incomplete information

  13. Usecase Graph What are the name and, if known, the e-mail of the authors of all available publications? SELECT PersonName, Email From {X} <ns3:author>{} <rdfs:member> {p}<ns3:name>{PersonName}; [<ns3:email> {Email}] USING NAMESPASE ns3 = <!…> (select PersonName, Email from {x} s:author {y}.rdfs:member{z} s:name{PersonName}, {z}s:email{Email} ) union ( select PersonName, Email from {x} s:author {y}.rdfs:member{z} s:name{PersonName} where not, (z in select x from {x}s:email{e})) Using namespace S=…., rdfs=…. <SeRQL> <RQL>

  14. Usecase Relational • Basic algebraic operation • Union • Return the table of all topic that and(union) the titles of all publications

  15. Usecase Relational • Basic algebraic operation • Difference • Return the labels of all topic that are not titles of publications (select title from s:Topic{T}.rdfs:label{title} ) minus ( select title from s:publication{P}, s:title{title}) using namespace S=…., rdfs=…. <RQL>

  16. Usecase Relational • Basic algebraic operation • Quantification • Return the person who are authors of all publications SELECT A FROM Artist{A} WHERE forall Z in (select W from {A}creates{W})           SUCH THAT exists D in (select X from {X}exhibited{Y}) SUCH THAT D = Z <RQL>

  17. Usecase Aggregation and Grouping • Aggregation • Count the number of author of a publication • Grouping • None of the compared query language allows to group values • SQL GROUP BY {?y.sam:author math:memberCount ?result .} => {:Query : Result ?result}. <N3>

  18. Usecase Recursion • Underlying relationship is transitive nature • Return all subject of topic “information System”, recursively FROALL O, P, V O[acm:SubTopic  V]  EXISTS W (O[acm:SubTopic  W] AND W[acm:SubTopic  V] @default:In. FORALL Y  (‘…#ACMTopic/’ : Information_System[acm:SubTopic  Y]@default:In. <Triple>

  19. Usecase Reification • Adds a meta-layer to the graph and allow treating RDF statements FORALL V, W, X, Y, Z  (V[W<X[Y Z]>) <Triple> (all() |- rdf:subject  @”../versa-sample.rdf#Paper”) – dc:create  * <Versa>

  20. Usecase Collection and Containers • Retrieve the individual and all elements • Return the first author of Publication X

  21. Usecase Namespaces • Integral part of any query language for web-based data • Return all resources whose namespace starts with http://www.aifb.unikalsrhe.de/. select ?x ?y ?z where(?x ?y ?z) AND ?x= ~ “http://www.aifb.uni-karlsruhe.de/*” <RDQL>

  22. Usecase Language • XML-style language tagging • RDF literal can optionally carry an xml:lang attribute • Return the German label of the topic whose English label is “Database Management” select deLabel from {} <rdfs:label> {deLabel, enLabel} where lang(deLabel) = “de” and lang(enLabel) = “en” and label(enLabel) = “Database Management” <SeRQL>

  23. Usecase Literal and Datatypes • RDF supports the type system of XML schema data type Return all publication where the page number is the integer value “08” Return all publication where the page number is the integer value 8

  24. Usecase Element • RDF schema vocabulary supports the entailment if implicit information select publications from ns3:Publication{publication} using namespace ns3 = <!http://www.aifb.de/wbs/pha/sample.rdf#> <RQL>

  25. Conclusion

More Related