RDF & SPARQL 320302 Databases & WebApplications (P. Baumann) - - PowerPoint PPT Presentation

rdf sparql
SMART_READER_LITE
LIVE PREVIEW

RDF & SPARQL 320302 Databases & WebApplications (P. Baumann) - - PowerPoint PPT Presentation

RDF & SPARQL 320302 Databases & WebApplications (P. Baumann) The Semantic Web Stack research / vapourware solid implementations RDF + RDFS WSDL + UDDI URI Unicode SOAP HTTP / SMTP / TCP 320302 Databases & WebServices (P.


slide-1
SLIDE 1

320302 Databases & WebApplications (P. Baumann)

RDF & SPARQL

slide-2
SLIDE 2

2 320302 Databases & WebServices (P. Baumann)

SOAP HTTP / SMTP / … TCP Unicode URI RDF + RDFS WSDL + UDDI

The Semantic Web Stack

research / vapourware solid implementations

slide-3
SLIDE 3

3 320302 Databases & WebServices (P. Baumann)

RDF

  • Resource Description Framework (RDF)
  • framework for describing resources on the web, identified by URIs

= very simple language for making assertions

  • model for data, and a syntax

independent parties can exchange & use it

  • Query language: SPARQL, see later
  • designed to be read and understood by computers,

not designed for being displayed to people

  • RDF (conceptual model) is independent from XML (data exchange)
  • XML is a transfer syntax (carrier) for RDF, not a component of RDF
  • RDF data might never occur in XML form
  • W3C Recommendation, part of W3C's Semantic Web Activity
slide-4
SLIDE 4

4 320302 Databases & WebServices (P. Baumann)

RDF - Examples of Use

  • Describing properties for shopping items
  • such as price and availability
  • Describing time schedules for web events
  • Describing information about web pages
  • such as content, author, created and modified date
  • Describing content and rating for web pictures
  • Describing content for search engines
  • Describing electronic libraries
slide-5
SLIDE 5

5 320302 Databases & WebServices (P. Baumann)

RDF Data Model

  • Conceptual model: directed, labeled graphs
  • RDF statements consist of
  • resources (= nodes)
  • which have properties
  • which have values (= nodes, strings)

http://www.w3.org/TR/REC-rdf-syntax/ “Ora Lassila”

author

resource value property = subject = predicate = object OO Model in Databases? = object = attribute = value

  • Ex: “http://www.w3.org/TR/REC-rdf-syntax/ has the author Ora Lassila”
slide-6
SLIDE 6

6 320302 Databases & WebServices (P. Baumann)

RDF Example

  • literals are primitive values
  • anonymous bnodesare identified by properties

http://www.ideanest.com/ homepage creator "Piotr Kaminski" "piotr@ideanest.com" name email Resources Literals Legend

slide-7
SLIDE 7

7 320302 Databases & WebServices (P. Baumann)

Alternative RDF Representations

eecs/320302 eecs/320212 requires prefix: http://www.jacobs-university.de/ Graphs:

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:in="http://www.iu-bremen.de/"> <rdf:description rdf:about="http://www.jacobs-university.de/eecs/320302"> <in:requires rdf:resource="http://www.jacobs-university.de/eecs/320212"/> </rdf:description> </rdf:RDF>

XML:

@prefix in:http://www.iu-bremen.de/ . in:eecs/320302 in:requires in:eecs/320212 .

Notation3:

compact & readable alternative to RDF's XML syntax { "http://www. jacobs-university.de/eecs/320302“, requires, “http://www. jacobs-university.de/eecs/320212“}

{ }:

RDF doc root

slide-8
SLIDE 8

8 320302 Databases & WebServices (P. Baumann)

Building Complex Networks

  • Corresponding triples:
  • { “http://www.w3.org/TR/PR-rdf-syntax/”, dc:Creator, x }
  • { x, p:Name, “Ora Lassila” }
  • { x, p:EMail, “ora.lassila@nokia.com” }

http://www.w3.org/TR/REC-rdf-syntax/ “Ora Lassila” dc:Creator “ora.lassila@nokia.com” p:EMail p:Name anonymous nodes

slide-9
SLIDE 9

9 320302 Databases & WebServices (P. Baumann)

SPARQL

  • = Simple Protocol and RDF Query Language
  • W3C recommendation
  • = QL for RDF
  • extract information in the form of URIs, blank nodes, plain and typed literals
  • extract RDF subgraphs
  • construct new RDF graphs based on information in the queried graphs
  • Let‘s taste the flavor...
slide-10
SLIDE 10

10 320302 Databases & WebServices (P. Baumann)

From SQL To SPARQL

SELECT name, email FROM Person

slide-11
SLIDE 11

11 320302 Databases & WebServices (P. Baumann)

From SQL To SPARQL

SELECT ?name ?email WHERE { ?person rdf:type foaf:Person. ?person foaf:name ?name. ?person foaf:mbox ?email. }

slide-12
SLIDE 12

12 320302 Databases & WebServices (P. Baumann)

From SQL To SPARQL

PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?name ?email WHERE { ?person rdf:type foaf:Person. ?person foaf:name ?name. ?person foaf:mbox ?email. }

slide-13
SLIDE 13

13 320302 Databases & WebServices (P. Baumann)

FOAF

  • FOAF (“Friend of a friend”) = a machine-readable ontology
  • descriptive vocabulary expressed in RDF and OWL
  • Profile = concrete instance of a vocabulary (ie, set of terms)
  • unique identifier (e-mail address, URI, …) for defining relationships → decentralised!
  • can describe persons, activities, relations to other people & objects
  • Ex: FOAF profiles to find all people living in Europe,

list all people both you and a friend of yours know

  • FOAF Project defines & extends vocabulary of a FOAF profile
  • started in 2000 by Libby Miller and Dan Brickley
  • first Social Semantic Web application
slide-14
SLIDE 14

14 320302 Databases & WebServices (P. Baumann)

FOAF: Tech

  • WebID Protocol = decentralized secure authentication protocol utilizing

FOAF profile information + SSL

  • usual SSL utilization: require trusted certificate authority
  • Here: does not require dedicated certificate authority to perform user authorization

→ identities can be minted for users easily by authorities → FOAF-based web of trust established gradually, without formal key signing parties

  • makes identity more trustworthy + and hard for anyone (even the original issuing

authority) to forge

  • Related:
  • Description of a Career (DOAC)
  • Description of a Project (DOAP)
slide-15
SLIDE 15

15 320302 Databases & WebServices (P. Baumann)

SPARQL – Example 1

  • Data

(1 triple):

  • Query:

<http://example.org/book/book1> <http://purl.org/dc/elements/1.1/title> "SPARQL Tutorial" . SELECT ?title WHERE { <http://example.org/book/book1> <http://purl.org/dc/elements/1.1/title> ?title . } title "SPARQL Tutorial" .

slide-16
SLIDE 16

16 320302 Databases & WebServices (P. Baumann)

@prefixfoaf: <http://xmlns.com/foaf/0.1/> . _:a foaf:name "Johnny Lee Outlaw" . _:a foaf:mbox <mailto:jlow@example.com> . _:b foaf:name "Peter Goodguy" . _:b foaf:mbox <mailto:peter@example.org> . _:c foaf:mbox <mailto:carol@example.org> .

SPARQL – Example 2

name mbox "Johnny Lee Outlaw“ <mailto:jlow@example.com> "Peter Goodguy“ <mailto:peter@example.org> PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?name ?mbox WHERE { ?x foaf:name ?name . ?x foaf:mbox?mbox }

slide-17
SLIDE 17

17 320302 Databases & WebServices (P. Baumann)

Anatomy of a Query

slide-18
SLIDE 18

18 320302 Databases & WebServices (P. Baumann)

RDF Datasets

slide-19
SLIDE 19

19 320302 Databases & WebServices (P. Baumann)

Intermediate Summary

  • RDF to model ontologies & graphs
  • SPARQL to query RDF
  • Return data items, graphs, Booleans
  • Integrates into SQL
  • Implementations:
  • OS: Apache Jena (Java), Sesame (Java), RDF-Query (Perl), Dydra (cloud), ...
  • Commercial: Oracle Semantic Technologies, OpenLink Virtuoso, ...
  • See also:
  • Planet RDF, Triplr
slide-20
SLIDE 20

20 320302 Databases & WebServices (P. Baumann)

Recap: where do we stand with Semantic Web Services?

slide-21
SLIDE 21

21 320302 Databases & WebServices (P. Baumann)

WWW2002 The eleventh international world wide web conference Sheraton waikiki hotel, Honolulu, hawaii, USA 7-11 may 2002, 1 location 5 days learn interact Registered participants coming from australia, canada, chile denmark, france, germany, ghana, hong kong,, norway, singapore, switzerland, the united kingdom, the united states, vietnam, zaire Register now On the 7th May Honolulu will provide the backdrop of the eleventh international world wide web conference. This prestigious event.. Speakers confirmed Tim Berners-Lee Tim is the well known inventor of the Web, … Ian Foster Ian is the pioneer of the Grid, the next generation internet …

Step 1: What We See

slide-22
SLIDE 22

22 320302 Databases & WebServices (P. Baumann)

                

Step 1: What a Machine Sees

slide-23
SLIDE 23

23 320302 Databases & WebServices (P. Baumann)

<conferenceName></conferenceName> <venue> </venue>    <participantOrigin> <country> </country> <country>  </country> <country> </country> <country> </country> <country> </country> <country>  </country> <country>  </country> <country>  </country> </participantOrigin>        

Step 1: What a Machine Sees with XML

Now machine can answer questions:

  • Name of conference?
  • How many countries?
slide-24
SLIDE 24

24 320302 Databases & WebServices (P. Baumann)

Step 2: Understand the Unknown

“Find Prof. Cook, a professor at U Washington, earlier a senior lecturer at his alma mater in Australia”

slide-25
SLIDE 25

25 320302 Databases & WebServices (P. Baumann)

“Find Prof. Cook, a professor at U Washington, earlier a senior lecturer at his alma mater in Australia”

Step 2: Understand the Unknown

James Cook

Data Instance Semantic Mapping Assoc. Professor Asst. Professor Senior Lecturer

www.cs.washington.edu www.cs.usyd.edu.au

People Staff Faculty

Professor Academic Technical Professor Lecturer Staff

… …

UWash ontology USyd ontology

Now machine can answer questions

  • n concept worlds („ontologies“)

James Cook

hasOccupation hasTitle belongsTo isA isA isA belongsTo belongsTo

“88b”

hasOffice

slide-26
SLIDE 26

26 320302 Databases & WebServices (P. Baumann)

Resources

  • www.w3.org/RDF/Validator

(online RDF validator)

  • http://homepages.cwi.nl/~lynda/spool/sw-tue-2003.ppt
  • www.ltg.ed.ac.uk/~ht/ora-rdf-dagstuhl.ppt
  • www.w3c.org/RDF/Metalog
  • Apache Jena™ = Java framework for building Semantic Web applications