querying the semantic web with rql l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Querying the Semantic Web with RQL * PowerPoint Presentation
Download Presentation
Querying the Semantic Web with RQL *

Loading in 2 Seconds...

play fullscreen
1 / 39

Querying the Semantic Web with RQL * - PowerPoint PPT Presentation


  • 316 Views
  • Uploaded on

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

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
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
Contents
  • Introduction
  • Motivating Example
  • A Formal Model for RDF
  • The RDF Query Language : RQL
  • Conclusion
introduction
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
introduction4
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
motivating example

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
the rdf query language rql
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
example
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 $
example8
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
example9
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))

example10
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)

example11
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)
example12
Example
  • Q6:Find the names of Artists whose Artifacts are exhibited in museums, along with the related Museum title
example13
Example

Select V, R, Y, Z

From {X}creates.exhibited{Y}.title{Z},

{X}fname{V}, {X}lname{R}

example14
Example
  • Q7: Fine the source and target value of properties emanating from ExtResources

Select X, Y

from {X; ExtResource}@P{Y}

example15
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”

example17
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}))

squishql
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
squishql20
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
squishql21
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
squishql example
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#>

rdfpath
RDFPath
  • Plan to make an XPath*-like query system for the RDF data model
rdfpath24
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
rdfpath25
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"
rdfpath26
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"
rdfpath27
RDFPath
  • Query Refinements
    • /dc:creator [a w3c:StaffMember]
      • Returns all of the w3c:StaffMembers who are listed as the dc:creator of a resource
triple
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]>]
triple29

model1

Set of RulesDescribing Semantics of a Data Model

model2

TRIPLE
triple language description
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
triple example

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

triple example32
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).

versa
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>

rdfql
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
rdfql35
RDFQL

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