1 / 39

Querying the Semantic Web with RQL *

Querying the Semantic Web with RQL * G. Karvounarakis, A. Magganaraki S. Alexaki , V. Christophides , D. Plexousakis, M. Scholl , K. Tolle , The International Journal of Computer and Telecommunications Networking , Volume 42, 617 - 640 , 2003 DBLab 고명석 Contents Introduction

jana
Download Presentation

Querying the Semantic Web with RQL *

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. Querying the Semantic Web with RQL* G. Karvounarakis, A. Magganaraki S. Alexaki , V. Christophides , D. Plexousakis, M. Scholl , K. Tolle , The International Journal of Computer and Telecommunications Networking , Volume 42, 617 - 640 , 2003 DBLab 고명석

  2. Contents • Introduction • Motivating Example • A Formal Model for RDF • The RDF Query Language : RQL • Conclusion

  3. Introduction • Next evolution step of the web • Vast amount of information • Various kinds of descriptive information • Better knowledge • The meaning, usage, accessibility or quality of web resource • RDF enable the creation and exchange of resource metadata

  4. Introduction • RDF Provides • Standard Representation Language • For metadata based on directed labeled graph • Schema Definition Language • For creating vocabularies of labels for these graph node • XML syntax for expressing metadata and schemas • Humanly readable and machine understandable

  5. String fname exhibited creates Artifact Museum Artist String String lname String material sculpts title Sculptor mime-type Sculpture String String file-size paints technique Ext. Resource String Painter Painting String last_modified title fname “Reina Sofia Museum” exhibited “Pablo” &r3 &r1 paints last_modified lname &r2 “Picaso” 2000-06-09 “oil on Canvas” technique fname typeOf (instance) technique “Van” paints “oil on Canvas” &r4 subclassOf (isA) &r5 lname subPropertyof “Gogh” exhibited &r8 title fname “Rodin” creates exhibited “Rodin Museum” &r6 &r7 last_modified “August” lname mime-type “image/jpeg” 2000-02-01 Motivating Example

  6. The RDF Query Language : RQL • RQL Provides • Select-form-where filter • Standard Boolean matching • =, <, >, like • Ex) “Painter” < “Artist” • { } • To introduce appropriate schema or data variables • “^” • Only the node labeled with the class name

  7. Example • Q1 : Which classes can appear as domain and range of the property creates? Select $C1, $C2 from {$C1} creates {$C2} “C1 <= domain(creates) and C2 <= range(creates)” Subclassof(domain(creates)) and Subclassof(range(creates)) • Class variable are prefixed by $

  8. Example • Q2 : Find all properties(and their range) that are applicable on class Painter Select @P, range(@P) from {$C}@P Where $C = Painter domain(P) >= Painter • @P is property variable • {x;C} • Filters data node x which are labeled with a class name • {;C} • Simply denotes a filtering condition of schema nodes

  9. Example • Q3: Fine all information related to class Painter(i.e., its superclasses as well as direct or inherited properties) Seq(Painter, superclassof^(Painter), (select @P, domain(@P), range(@P) from {;Painter}@P))

  10. Example • Q4: What properties can be reached(in one step) from the range classes of creates? • “ . ” • Notation implies a join condition between the range classes of the property creates and the domain of @P valuations Select $Y, @P, range(@P) from creates{$Y}.@P $Y <= domain(@P) and $Y <= range(creates)

  11. Example • Q5: Fine the Museum resources that have been modified after year 2000 Select X, Y Form Museum{X}.last_modified{Y} Where Y >= 2000-01-01 • Return to site www.museum.es(&r4) • Return to site www.rodin.fr(&r7)

  12. Example • Q6:Find the names of Artists whose Artifacts are exhibited in museums, along with the related Museum title

  13. Example Select V, R, Y, Z From {X}creates.exhibited{Y}.title{Z}, {X}fname{V}, {X}lname{R}

  14. Example • Q7: Fine the source and target value of properties emanating from ExtResources Select X, Y from {X; ExtResource}@P{Y}

  15. Example • Q8: Find the descriptions of resources whose URI matches “www.museum.es” Select X, (select $W, (select @P, Y from {X;$W}@P{Y}) from $W{X}) From Resource{X} Where X like “www.museum.es”

  16. Example

  17. Example • Q9: Find the description, under the form of triples, of resources excluding properties related to the class ExtResource ((Select X, @P, Y from {X}@P{Y}) Union (Select X, type, $W from $W{X})) minus ((Select X, @P, Y from {X;ExtResource}@P{Y}) union (Select X, type, ExtResorse from ExtResorse{X}))

  18. RDF Query Language

  19. SquishQL • Use SQL-like constructs to reflectRDF‘ graph syntax • Variables are indicated by ‘?’ • Most general pattern is (?x, ?y, ?z) • There are two classes of constraints • Patterns • <subject, predicate, object> describing edges of the graph and conjunction operator • Filter expressions • Remove the possibility

  20. SquishQL • Query typically built on five clauses • SELECT Clause • Identifies the variables to be returned to the application • FROM Clause • specifies the model by URI • WHERE Clause • Specifies the graph pattern as the conjunction of the list of triple patterns

  21. SquishQL • Query typically built on five clauses • AND Clause • Specifies the Boolean expressions over values of URIs and literals • arithmetic comparisons, and boolean expressions, including disjunction and negation • USING Clause • A way to shorten the length of URIs

  22. SquishQL - Example Query: Finds the titles of documents in http://example.com/xmleurope/presentations.rdf SELECT ?title FROM http://example.com/xmleurope/presentations.rdf WHERE (?doc, <dc:title>, ?title), (?doc, <rdf:type>, <foaf:Document>) USING dc FOR <http://purl.org/dc/elements/1.1/>, rdf FOR <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

  23. RDFPath • Plan to make an XPath*-like query system for the RDF data model

  24. RDFPath • Node Queries • / • Returns all nodes. • [ ] • Returns all anonymous nodes • [foaf:mbox "me@aaronsw.com"] • Returns all nodes where the value of the property foaf:mbox equals the literal me@aaronsw.com • [foaf:mbox "me@aaronsw.com" ; foaf:homepage <http://www.aaronsw.com>] • Returns nodes where foaf:mbox equals the literal of my email address and foaf:homepage equals the resource of my homepage

  25. RDFPath • Node Queries • [a rdf:Bag] • Returns nodes of type rdf:Bag • <http://example.org/#foo> • Returns the resource <http://example.org/#foo> • "Whatever" • Returns the literal "Whatever"

  26. RDFPath • Sub-queries • /dc:creator • Returns values of the dc:creator property for all resources • /[a rdfs:ContainerMembershipProperty] • Returns the values of all container membership properties (_1, _2, etc.) for all resources • "Aaron Swartz"\dc:creator • Returns all resources with a dc:creator property of "Aaron Swartz"

  27. RDFPath • Query Refinements • /dc:creator [a w3c:StaffMember] • Returns all of the w3c:StaffMembers who are listed as the dc:creator of a resource

  28. TRIPLE • Goal • use various semantics in one inference • Information integration • Syntactically inspired by F-Logic: • subject[predicateobject] • Example • Sara [livesIn → Linköping; hasAge → 35] • Sara [hasChild → Lotta[hasAge → 5]] • Sara[believes →<Lotta[hasIllness → cold]>]

  29. model1 Set of RulesDescribing Semantics of a Data Model model2 TRIPLE

  30. TRIPLE – language description • Namespace and resource abbreviations: • rdf := “http://www.w3.org/1999/02/22-rdf-syntax-ns#” • isa := rdf:subClassOf • Statements, triples, molecules: • subject[predicateobject] • subject[p1o1;p2 o2; ...] • s1[p1  s2[p2o] ] • Models, model expressions, parameterized models: • s[po]@m “triple <s,p,o> in model m” • s[po]@(m1 m2) model intersection, union, diff. • s[po]@sf(m1, X, Y) Skolem function

  31. TRIPLE Michael Sintek dc:title dc:creator dfki:d_01_01 dc:subject dc:subject ... RDF triples Query: FORALL D <- D[dc:subject  RDF]@dfki:documents TRIPLE - Example namespace abbreviations dc := “http://purl.org/dc/elements/1.0/”. dfki := “http://www.dfki.de/”. block @dfki:documents { } dfki:d_01_01 [ dc:title  “TRIPLE”; dc:creator  “Michael Sintek”; dc:subject  RDF; dc:subject  triples; ... ]. fact

  32. TRIPLE - Example Cars Ontology with RDF Schema Semantics @cars { xyz:MotorVehicle[rdfs:subClassOf -> rdfs:Resource]. xyz:PassengerVehicle[rdfs:subClassOf -> xyz:MotorVehicle]. xyz:Truck[rdfs:subClassOf -> xyz:MotorVehicle]. xyz:Van[rdfs:subClassOf -> xyz:MotorVehicle]. xyz:MiniVan[ rdfs:subClassOf -> xyz:Van; rdfs:subClassOf -> xyz:PassengerVehicle]. } xyz:MotorVehicle xyz:Truck xyz:Van xyz:PassengerVehicle xyz:MiniVan X = xyz:Van X = xyz:Truck X = xyz:PassengerVehicle FORALL X <- X[rdfs:subClassOf -> xyz:MotorVehicle]@cars. X = xyz:Van X = xyz:Truck X = xyz:PassengerVehicle X = xyz:MiniVan FORALL X <- X[rdfs:subClassOf -> xyz:MotorVehicle]@rdfschema(cars).

  33. VERSA • Graphic-based query language for querying RDF Model • the traversal expression which matches patterns in the model's graph all() - dc:date -> * all() |- rdfs:label -> eq("Web [ 1 ]") <List> <String>2001-03-04</String> <String>2001-04-20</String> </List>

  34. RDFQL • RDFQL is the language used by RDF Gateway applications and agents • RDF Gateway • A platform for Semantic Web applications and agents • A simple SQL-style language • with inference extensions to perform complex deductive queries

  35. RDFQL SELECT ?bFROM <http://weblog.burningbird.net/resume.rdf>WHERE (?a, <bbd:title>, ?b)USING bbd for >http://www.burningbird.net/resume_schema#>

  36. Comparison of Query language

  37. Comparison of Query language

  38. Comparison of Query language

  39. Comparison of Query language

More Related