Semantic Web Andrejs Lesovskis. Publishing on the Web Making information available without knowing the eventual use; reuse, collaboration; reproduction.

Slides:



Advertisements
Similar presentations
Schema Matching and Query Rewriting in Ontology-based Data Integration Zdeňka Linková ICS AS CR Advisor: Július Štuller.
Advertisements

Alexandra Cristea & Matthew Yau 1.
SPARQL- A QUERY LANGUAGE FOR RDF( S ) Fred Freitas - CIn/UFPE - Brazil.
1 © Copyright 2010 Dieter Fensel, Federico Facca and Ioan Toma Semantic Web Storage and Querying.
ESDSWG2011 – Semantic Web session Semantic Web Sub-group Session ESDSWG 2011 Meeting – Semantic Web sub-group session Wednesday, November 2, 2011 Norfolk,
RDF Tutorial.
Semantic Web Introduction
A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer Paul R. Smart, Alistair Russell, Dave Braines, Yannis Kalfoglou,,
Information Systems & Semantic Web University of Koblenz ▪ Landau, Germany Semantic Web - Query Languages – Steffen Staab
 Copyright 2004 Digital Enterprise Research Institute. All rights reserved. SPARQL Query Language for RDF presented by Cristina Feier.
SPARQL RDF Query.
JSON Valery Ivanov.
Chapter 3 Querying RDF stores with SPARQL. TL;DR We will want to query large RDF datasets, e.g. LOD SPARQL is the SQL of RDF SPARQL is a language to query.
™ Suggestions for Semantic Web Interfaces to Relational Databases Mike Dean W3C Workshop on RDF Access to Relational Databases Cambridge,
SPARQL for Querying PML Data Jitin Arora. Overview SPARQL: Query Language for RDF Graphs W3C Recommendation since 15 January 2008 Outline: Basic Concepts.
CSCI 572 Project Presentation Mohsen Taheriyan Semantic Search on FOAF profiles.
RDF: Building Block for the Semantic Web Jim Ellenberger UCCS CS5260 Spring 2011.
Semantic Web Bootcamp Dominic DiFranzo PhD Student/Research Assistant Rensselaer Polytechnic Institute Tetherless World Constellation.
CIMI / FHIR and Shape Expressions. Local DB … …
Logics for Data and Knowledge Representation SPARQL Protocol and RDF Query Language (SPARQL) Feroz Farazi.
© 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Publishing data on the Web (with.
1 WebSocket & JSON Java APIs Hackday By Somay David
1 Ontology Query and Reasoning Payam Barnaghi Institute for Communication Systems (ICS) Faculty of Engineering and Physical Sciences University of Surrey.
SPARQL All slides are adapted from the W3C Recommendation SPARQL Query Language for RDF Web link:
Master Informatique 1 Semantic Technologies Part 5SPARQL Werner Nutt.
Introduction to SPARQL. Acknowledgements This presentation is based on the W3C Candidate Recommendation “SPARQL Query Language for RDF” from
The New Zealand Institute for Plant & Food Research Limited Matthew Laurenson Web Services: Introduction & Design Considerations.
SPARQL Semantic Web - Spring 2008 Computer Engineering Department Sharif University of Technology.
Chapter 3 Querying RDF stores with SPARQL. Why an RDF Query Language? Why not use an XML query language? XML at a lower level of abstraction than RDF.
Lecture 13 – XML and JSON SFDV3011 – Advanced Web Development Reference: 1.
Semantic web course – Computer Engineering Department – Sharif Univ. of Technology – Fall Querying on the Web: XQuery, RDQL, SparQL Semantic Web.
Master Informatique 1 Semantic Technologies Part 11Direct Mapping Werner Nutt.
SPARQL W3C Simple Protocol And RDF Query Language
SPARQL AN RDF Query Language. SPARQL SPARQL is a recursive acronym for SPARQL Protocol And Rdf Query Language SPARQL is the SQL for RDF Example: PREFIX.
SPARQL All slides are adapted from the W3C Recommendation SPARQL Query Language for RDF Web link:
JSON-LD. JSON as an XML Alternative JSON is a light-weight alternative to XML for data- interchange JSON = JavaScript Object Notation – It’s really language.
SPARQL Query Graph Model (How to improve query evaluation?) Ralf Heese and Olaf Hartig Humboldt-Universität zu Berlin.
INF5120 ”Modellbasert Systemutvikling” ”Modelbased System development” Lecture 11 (part 2): MDI I, Part II: Semantic Web.
CWM Closed World Machine. CWM Overview CWM is a popular Semantic Web program that can do the following tasks – Parse and pretty-print several RDF formats:
Google Data Protocol Guy Mark Lifshitz. Motivation Google’s Mission: – Organize the world’s information – Make information universally accessible – Provide.
Semantic Web Basics Dominic DiFranzo PhD Student/Research Assistant Rensselaer Polytechnic Institute Tetherless World Constellation.
© Copyright 2008 STI INNSBRUCK Semantic Web Repositories and SPARQL Dieter Fensel Federico Facca.
Introduction to the Semantic Web and Linked Data Module 1 - Unit 2 The Semantic Web and Linked Data Concepts 1-1 Library of Congress BIBFRAME Pilot Training.
Dr. Lowell Vizenor Ontology and Semantic Technology Practice Lead Alion Science and Technology Semantic Technology: A Basic Introduction.
Ontology based e-Real Estate Agency Information System By Moein Mehrolhasani Bijan Zamanian cmpe 588.
05/01/2016 SPARQL SPARQL Protocol and RDF Query Language S. Garlatti.
Chapter 3 Querying RDF stores with SPARQL
Alexandra Cristea 1.  pronounced "sparkle“  recursive acronym for: ◦ SPARQL Protocol and RDF Query Language  a semantic query language  a query language.
Of 38 lecture 6: rdf – axiomatic semantics and query.
Lecture 8: RDF& SPARQL Dr. Taysir Hassan A. Soliman December 13, 2015 INF411 Information Engineering Information Systems Dept. Faculty of Computers & Information.
Semantic Web in Depth RDFa, GRDDL and POWDER Dr Nicholas Gibbins
Semantic Web in Depth SPARQL Protocol and RDF Query Language Dr Nicholas Gibbins –
SysML v2 Model Interoperability & Standard API Requirements Axel Reichwein Consultant, Koneksys December 10, 2015.
CWM Closed World Machine. CWM Overview CWM is a simple Semantic Web program that can do the following tasks – Read and pretty-print several RDF formats.
SPARQL Query Andy Seaborne. Apache Jena he.org/jena ● Open source - Apache License ● Apache Incubator (accepted November 2010) ●
Vincenzo Maltese, Fausto Giunchiglia University of Trento
Storage and Querying Anna Fensel
SPARQL.
Introduction to SPARQL
JSON.
SPARQL ดร.มารุต บูรณรัช
SPARQL SPARQL Protocol and RDF Query Language
JSON-LD.
SPARQL: A query language for RDF
Logics for Data and Knowledge Representation
Integrating REST API and SQL Server JSON Functions
JSON for Linked Data: a standard for serializing RDF using JSON
Logics for Data and Knowledge Representation
JSON-LD.
Presentation transcript:

Semantic Web Andrejs Lesovskis

Publishing on the Web Making information available without knowing the eventual use; reuse, collaboration; reproduction of results. Also, there are: Economic issues; DRM, copyright and licensing issues;...

3 Publishing on the Semantic Web  SPARQL  OWL, RDFS, SKOS  RDF  URIs  XML Data Access Information organisation Information format Identification Serialization Publishing via a query service on the web

SPARQL Protocol and RDF Query Language

What is SPARQL? SPARQL is the query language of the Semantic Web, stays for SPARQL Protocol and RDF Query Language. SPARQL 1.1 Protocol became a W3C recommendation on March 21, This protocol was developed by the W3C SPARQL Working Group, part of the Semantic Web Activity.

Motivation Having RDF data available is not enough Need tools to process, transform, and reason with the information Need a way to store the RDF data and interact with it Are existing storage systems appropriate to store RDF data? Are existing query languages appropriate to query RDF data?

Why SPARQL? SPARQL allows to: Pull values from structured and semi- structured data represented in RDF; Explore RDF data by querying unknown relationships; Perform complex joins of disparate RDF repositories in a single query; Transform RDF data from one vocabulary to another; Develop higher-level cross-platform application.

Anatomy of a SPARQL query

Basic patterns A basic pattern is a set of triple patterns, all of which must be matched. In this case matches the graph means find a set of bindings such that the substitution of variables for values creates a subgraph that is in the set of triples making up the graph.

SPARQL query forms SELECT, CONSTRUCT, ASK, DESCRIBE.

SELECT query SPARQL’ SELECT is rather similar to SELECT from SQL. The SELECT form of results returns variables and their bindings directly. It combines the operations of projecting the required variables with introducing new variable bindings into a query solution.

SELECT query example PREFIX skos: PREFIX dbpedia2: SELECT ?presName, ?birthday, ?startDate WHERE { ?presName skos:subject ; dbpedia2:birth ?birthday; dbpedia2:presidentStart ?startDate. }

SELECT with OPTIONAL

SELECT with multiple OPTIONAL

CONSTRUCT query The CONSTRUCT query form returns a single RDF graph specified by a graph template. The result is an RDF graph formed by taking each query solution in the solution sequence, substituting for the variables in the graph template, and combining the triples into a single RDF graph by set union.

CONSTRUCT :. :jane :hasParent :gene. :gene :hasParent :pat ; :gender :female. :joan :hasParent :pat ; :gender :female. :pat :gender :male. :mike :hasParent :joan.

CONSTRUCT example (cont.) PREFIX : CONSTRUCT { ?p :hasGrandfather ?g. } WHERE { ?p :hasParent ?parent. ?parent :hasParent ?g. ?g :gender :male.}

CONSTRUCT example :. :jane :hasGrandfather :pat. :mike :hasGrandfather :pat.

ASK query Applications can use the ASK form to test whether or not a query pattern has a solution. No information is returned about the possible query solutions, just whether or not a solution exists.

ASK query foaf:. _:a foaf:name "Alice". _:a foaf:homepage. _:b foaf:name "Bob". _:b foaf:mbox. PREFIX foaf: ASK { ?x foaf:name "Alice" }

DESCRIBE query The DESCRIBE form returns a single result RDF graph containing RDF data about resources. This data is not prescribed by a SPARQL query, where the query client would need to know the structure of the RDF in the data source, but, instead, is determined by the SPARQL query processor. Some SPARQL endpoint don’t support this type of queries.

PREFIX ent: DESCRIBE ?x WHERE { ?x ent:employeeId "1234" owl: _:a exOrg:employeeId "1234" ; foaf:mbox_sha1sum "ABCD1234" ; vcard:N [ vcard:Family "Smith" ; vcard:Given "John" ]. foaf:mbox_sha1sum rdf:type owl:InverseFunctionalProperty.

SPARQL query result formats XML, JSON (JavaScript Object Notation), RDF, HTML.

JavaScript Object Notation JSON (JavaScript Object Notation) is a text-based, lightweight data- interchange format. It's easy to read and write for humans and to parse and generate for machines. JSON was originally specified by Douglas Crockford, and is described in RFC 4627.

JavaScript Object Notation { "firstName": "John", "lastName" : "Smith", "age" : 25, "address" : { "streetAddress": "21 2nd Street", "city" : "New York", "state" : "NY", "postalCode" : "10021" }, … }

A RDF Graph Modeling Movies movie1 movie:Movie “Edward ScissorHands” “1990” rdf:type movie:title movie:year movie:Genre movie:Romance movie:Comedy rdf:type movie:genre movie:Role “Edward ScissorHands” r1 actor1 movie:playedBy movie:characterName rdf:type movie:hasPart

Example Query 1 Select the movies that has a character called “Edward Scissorhands” PREFIX movie: SELECT DISTINCT ?x ?t WHERE { ?x movie:title ?t ; movie:hasPart ?y. ?y movie:characterName ?z. FILTER (?z = “Edward }

Example Query 1 PREFIX movie: SELECT DISTINCT ?x ?t WHERE { ?x movie:title ?t ; movie:hasPart ?y. ?y movie:characterName ?z. FILTER (?z = “Edward } Note the use of “;” This allows to create triples referring to the previous triple pattern (extended version would be ?x movie:hasPart ?y) Note as well the use of the language speciation in the

Example Query 2 Create a graph of actors and relate them to the movies they play in (through a new ‘playsInMovie’ relation). PREFIX movie: PREFIX foaf: CONSTRUCT { ?x foaf:firstName ?fname. ?x foaf:lastName ?lname. ?x movie:playInMovie ?m } WHERE { ?m movie:title ?t ; movie:hasPart ?y. ?y movie:playedBy ?x. ?x foaf:firstName ?fname. ?x foaf:lastName ?lname. }

Example Query 3 Find all movies which share at least one genre with “Gone with the Wind” PREFIX movie: SELECT DISTINCT ?x2 ?t2 WHERE { ?x1 movie:title ?t1. ?x1 movie:genre ?g1. ?x2 movie:genre ?g2. ?x2 movie:title ?t2. FILTER (?t1 = “Gone with the && ?x1!=?x2 && ?g1=?g2) }

31 SPARQL and reasoning OWL, RDFS, application, rules PREFIX rdf: SELECT ?type WHERE { ?x rdf:type ?type. } :x rdf:type :C. :C rdfs:subClassOf :D | type | ======== | :C | | :D |

Thank you!