Ontology Engineering Lab #8 October 21, 2013. Review - Trial Query Exercises  What are the bones of the foot? (not sure this can be done in a single.

Slides:



Advertisements
Similar presentations
Dr. Alexandra I. Cristea CS 253: Topics in Database Systems: C4.
Advertisements

SPARQL Dimitar Kazakov, with references to material by Noureddin Sadawi ARIN, 2014.
CH-4 Ontologies, Querying and Data Integration. Introduction to RDF(S) RDF stands for Resource Description Framework. RDF is a standard for describing.
Creating Linked Data Juan F. Sequeda Semantic Technology Conference June 2011.
Lukas Blunschi Claudio Jossen Donald Kossmann Magdalini Mori Kurt Stockinger.
The Semantic Web – WEEK 4: RDF
GridVine: Building Internet-Scale Semantic Overlay Networks By Lan Tian.
SPARQL : Simple Protocol and RDF Query Language 第一版整理人 : 簡學群 Date : 2014 / 12.
Using JavaScript in Linked Data Applications Oshani Seneviratne Oct 12, 2010.
ESDSWG2011 – Semantic Web session Semantic Web Sub-group Session ESDSWG 2011 Meeting – Semantic Web sub-group session Wednesday, November 2, 2011 Norfolk,
Tutorial at WWW 2011 Scalable Integration and Processing of Linked Data Andreas Harth, Aidan Hogan, Spyros Kotoulas, Jacopo Urbani.
RDF Tutorial.
© Copyright IBM Corporation 2014 Getting started with Rational Engineering Lifecycle Manager queries Andy Lapping – Technical sales and solutions Joanne.
 Copyright 2010 Digital Enterprise Research Institute. All rights reserved. Digital Enterprise Research Institute Transforming between RDF.
 Copyright 2004 Digital Enterprise Research Institute. All rights reserved. SPARQL Query Language for RDF presented by Cristina Feier.
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.
SPARQL for Querying PML Data Jitin Arora. Overview SPARQL: Query Language for RDF Graphs W3C Recommendation since 15 January 2008 Outline: Basic Concepts.
Department of Computer Science, University of Maryland, College Park 1 Sharath Srinivas - CMSC 818Z, Spring 2007 Semantic Web and Knowledge Representation.
Presented by Gentre Dozier and Spencer Dille management.com/newsletters/database_metadata_unstructured_data_triple_store html.
Using PHP in Linked Data Applications Jie Bao Oct 12.
Semantic Web Andrejs Lesovskis. Publishing on the Web Making information available without knowing the eventual use; reuse, collaboration; reproduction.
Semantic Web Bootcamp Dominic DiFranzo PhD Student/Research Assistant Rensselaer Polytechnic Institute Tetherless World Constellation.
An OWL based schema for personal data protection policies Giles Hogben Joint Research Centre, European Commission.
CSE 428 Semantic Web Topics Introduction Jeff Heflin Lehigh University.
Chapter 3A Semantic Web Primer 1 Chapter 3 Querying the Semantic Web Grigoris Antoniou Paul Groth Frank van Harmelen Rinke Hoekstra.
Ontologies: Making Computers Smarter to Deal with Data Kei Cheung, PhD Yale Center for Medical Informatics CBB752, February 9, 2015, Yale University.
Logics for Data and Knowledge Representation SPARQL Protocol and RDF Query Language (SPARQL) Feroz Farazi.
UB LIS 571 Soergel Lecture 5.1 RDF, linked data, SPARQL query language Dagobert Soergel Department of Library and Information Studies Graduate School.
1 Ontology Query and Reasoning Payam Barnaghi Institute for Communication Systems (ICS) Faculty of Engineering and Physical Sciences University of Surrey.
Chapter 6 Understanding Each Other CSE 431 – Intelligent Agents.
Practical RDF Chapter 1. RDF: An Introduction
The Semantic Web Web Science Systems Development Spring 2015.
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.
Chapter 6 Understanding Each Other CSE 431 – Intelligent Agents.
Querying with SPARQL Tuesday, October 28, 2014 Technical Exchange on Network Management Interoperability Andrea Westerinen JHU-APL/Nine Points Solutions.
Lesley Charles November 23, 2009.
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:
SPARQL negation Rules of the Semantic Web Semantic MediaWiki NSWI Jan Dědek.
06 Dec Rev'd 07 Dec CmpE 583 Fall 2006 OWL Lite 1 OWL Lite off Textbook Ch. 11: Encoding Atilla Elçi.
Presentation : Konstantinos Kanaris.  What is Jena?  Usage of Jena  Main Concepts  Main Components  Storage Models  OWL API  RDF API  Reasoning.
ONTOLOGY ENGINEERING Lab #6 – October 6, The FILTER Keyword  Up to this point we’ve restricted the result set of a query by binding a variable.
Efficient RDF Storage and Retrieval in Jena2 Written by: Kevin Wilkinson, Craig Sayers, Harumi Kuno, Dave Reynolds Presented by: Umer Fareed 파리드.
Tutorial 13 Validating Documents with Schemas
SPARQL In-Class Shared Exercise. Pop Quiz If you have a large knowledge store, why should you not issue: SELECT ?s ?p ?o WHERE { ?s ?p ?o } Ans: It returns.
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.
Ontology engineering Lab #8 – October 20, 2014.
The Semantic Web Matt Klubertanz. What is it? “The Semantic Web is an extension of the current web in which information is given well- defined meaning,
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
ONTOLOGY ENGINEERING Lab #2 – September 8,
Of 38 lecture 6: rdf – axiomatic semantics and query.
An Effective SPARQL Support over Relational Database Jing Lu, Feng Cao, Li Ma, Yong Yu, Yue Pan SWDB-ODBIS 2007 SNU IDB Lab. Hyewon Lim July 30 th, 2009.
CC L A W EB DE D ATOS P RIMAVERA 2015 Lecture 7: SPARQL (1.0) Aidan Hogan
Introduction to the Semantic Web Jeff Heflin Lehigh University.
Semantic Web 06 T 0006 YOSHIYUKI Osawa. Problem of current web  limits of search engines Most web pages are only groups of character strings. Most web.
Getting More from Your VIVO Mike Conlon, UF Melissa Haendel, OHSU Kristi Holmes, Northwestern.
MEKON & HOBO Java Frameworks for building Ontology-Driven Applications Current use cases:  Almost (!) products:  Knowledge-driven clinical documentation.
CC La Web de Datos Primavera 2017 Lecture 7: SPARQL [i]
SPARQL SPARQL Protocol and RDF Query Language
Supporting Arbitrary Custom Datatypes in RDF and SPARQL
SPARQL + RDF Based on: Prof. Benny Kimelfled’s lecture notes
Prepared By: G.UshaRani B.Pranalini A.S.Lalitha
Bus Routes.
Logics for Data and Knowledge Representation
CC La Web de Datos Primavera 2016 Lecture 7: SPARQL (1.0)
DBpedia 2014 Liang Zheng 9.22.
Logics for Data and Knowledge Representation
Linked Data 101 Things, URIs, RDF, Triples, Turtle, Ontologies, Vocabularies and SPARQL Linked Data is our Implementation choice for FAIR.
Presentation transcript:

Ontology Engineering Lab #8 October 21, 2013

Review - Trial Query Exercises  What are the bones of the foot? (not sure this can be done in a single query, explore but do not spend time beyond a reasonable limit)  What types of things are the parts of the knee joint?  What are the parts of the heart and if they exist how are these parts defined?  What are the documented relationships between the Right Adrenal Gland and the Right Kidney? 2

Exploring DBPedia  DBPedia is a structured store of information from Wikipedia. (see for a summary)  SPARQL endpoint can be found at:  Pages for individual resources can be found at:

Keystroke Shortcuts  Using “;” to repeat the subject term over a set of statements in a where clause SELECT ?city ?faculty ?students WHERE { dbpedia-owl:city ?city ; dbpedia-owl:facultySize ?faculty ; dbpedia-owl:numberOfStudents ?students. }

Keystroke Shortcuts  Using “,” to repeat the subject and predicate over a set of statements in a where clause SELECT ?abstract_1 ?abstract_2 WHERE { dbpedia-owl:abstract ?abstract_1, ?abstract_2. FILTER (lang(?abstract_1) = "en"). FILTER (lang(?abstract_2) = "zh"). }

Different Uses of the Keyword: “OPTIONAL”  The following query returns public universities that have both a Forbes rating and a Kiplinger rating: SELECT ?university ?forbes_rating ?kiplinger_rating WHERE { ?university dbpedia-owl:type dbpedia:Public_university. ?university dbpprop:forbes ?forbes_rating. ?university dbpprop:kiplinger ?kiplinger_rating. } LIMIT 100

Different Uses of the Keyword: “OPTIONAL”  This query returns public universities and their Forbes rating and Kiplinger rating if they have them both: SELECT ?university ?forbes_rating ?kiplinger_rating WHERE { ?university dbpedia-owl:type dbpedia:Public_university. OPTIONAL {?university dbpprop:forbes ?forbes_rating. ?university dbpprop:kiplinger ?kiplinger_rating }. } LIMIT 100

Different Uses of the Keyword: “OPTIONAL”  This query returns public universities and their Forbes rating and Kiplinger rating if they have either of them: SELECT ?university ?forbes_rating ?kiplinger_rating WHERE { ?university dbpedia-owl:type dbpedia:Public_university. OPTIONAL {?university dbpprop:forbes ?forbes_rating }. OPTIONAL {?university dbpprop:kiplinger ?kiplinger_rating }. } LIMIT 100

Different Uses of the Keyword: “OPTIONAL”  This query returns public universities and their Kiplinger rating if they have one else it will return their Forbes rating if they have one: SELECT ?university ?rating WHERE { ?university dbpedia-owl:type dbpedia:Public_university. OPTIONAL {?university dbpprop:kiplinger ?rating }. OPTIONAL {?university dbpprop:forbes ?rating }. } LIMIT 100

The FILTER Keyword  Up to this point we’ve restricted the result set of a query by binding a variable to a class using some object property. For example, the second statement of the following where clause “filters” the result set to public universities in New York State: SELECT ?university WHERE { ?university dbpedia-owl:type dbpedia:Public_university. ?university dbpedia-owl:state dbpedia:New_York. } LIMIT 100

The FILTER Keyword  The FILTER keyword enables filtering on string and numeric values. The following SELECT query returns public universities that have “business” somewhere in the english label. SELECT ?university ?label WHERE { ?university dbpedia-owl:type dbpedia:Public_university. ?university rdfs:label ?label. FILTER regex(?label, "business", "i"). FILTER (lang(?label)= "en"). } LIMIT 100

The FILTER Keyword  The following SELECT query returns public universities that have enrollments of more than 60,000. SELECT ?university ?students WHERE { ?university dbpedia-owl:type dbpedia:Public_university. ?university dbpedia-owl:numberOfStudents ?students. FILTER (?students > 60000). } LIMIT 100

The FILTER Keyword  The following SELECT query returns public universities located in latitudes between 51 and 52 degrees and in longitudes between -1 and 1 degrees. SELECT ?university ?latitude ?longitude WHERE { ?university dbpedia-owl:type dbpedia:Public_university. ?university geo:lat ?latitude. ?university geo:long ?longitude. FILTER (?latitude > 51 && ?latitude < 52). FILTER (?longitude > -1 && ?longitude < 1). } LIMIT 100

The FILTER Keyword  The following SELECT query returns public companies that have revenues of more than 1 billion (US dollars) or equity of more than 100 billion (US dollars) SELECT ?company ?int_revenue ?int_equity WHERE { ?company dbpedia-owl:type dbpedia:Public_company. ?company dbpedia-owl:revenue ?revenue. ?company dbpedia-owl:equity ?equity. FILTER (datatype(?revenue) = ). BIND(xsd:integer(?revenue) as ?int_revenue). BIND(xsd:integer(?equity) as ?int_equity). FILTER (?int_revenue > || ?int_equity > ) } LIMIT 100

The Filter Keyword  The following SELECT query uses the FILTER keyword, logical operator ! and the bound function to return countries that do not have an associated name of their leader SELECT ?country ?leader_name WHERE { ?country rdf:type dbpedia-owl:Country. OPTIONAL {?country dbpedia-owl:leaderName ?leader_name }. FILTER(!bound(?leader_name)). } LIMIT 100

Appendix: Answers to Trial Query Exercises  What are the bones of the foot? PREFIX fma: PREFIX rdf: PREFIX rdfs: PREFIX owl: SELECT DISTINCT ?set_of_foot_bones ?bones_of_foot ?bones_of_foot_2 WHERE { fma:Skeleton_of_right_foot fma:member ?set_of_foot_bones. OPTIONAL {?set_of_foot_bones fma:member ?bones_of_foot }. OPTIONAL {?bones_of_foot fma:member ?bones_of_foot_2 }. }

Appendix: Answers to Trial Query Exercises  What are the bones of the foot? PREFIX fma: PREFIX rdf: PREFIX rdfs: PREFIX owl: SELECT DISTINCT ?foot_part WHERE { { fma:Right_foot fma:constitutional_part ?foot_part. ?foot_part fma:articulates_with ?articulate.} UNION { fma:Right_foot fma:constitutional_part ?foot_part_1. ?foot_part_1 fma:articulates_with ?foot_part.} UNION { fma:Right_foot fma:constitutional_part ?foot_part_1. ?foot_part_1 fma:articulates_with ?foot_part_2. ?foot_part_2 fma:articulates_with ?foot_part.} UNION { fma:Right_foot fma:constitutional_part ?foot_part_1. foot_part_1 fma:articulates_with ?foot_part_2. ?foot_part_2 fma:articulates_with ?foot_part_3. ?foot_part_3 fma:articulates_with ?foot_part.} }

Appendix: Answers to Trial Query Exercises  What types of things are the parts of the knee joint? PREFIX fma: PREFIX rdf: PREFIX rdfs: PREFIX owl: SELECT ?joint_part_type ?part_of_knee_joint WHERE { fma:Knee_joint fma:constitutional_part ?part_of_knee_joint. ?part_of_knee_joint a ?joint_part_type. } ORDER BY ?joint_part_type Most query interfaces allow the use of “a” as an abbreviation for rdf:type. The ORDER BY clause can be used to arrange the result set in order of one or more of the result set variables.

Appendix: Answers to Trial Query Exercises  What are the parts of the heart and if they exist how are these parts defined? PREFIX fma: PREFIX rdf: PREFIX rdfs: PREFIX owl: SELECT ?part_of_heart ?definition WHERE { fma:Heart fma:constitutional_part ?part_of_heart. OPTIONAL {?part_of_heart fma:definition ?definition }. }

Appendix: Answers to Trial Query Exercises  What are the documented relationships between the right adrenal gland and the right kidney? PREFIX fma: PREFIX rdf: PREFIX rdfs: PREFIX owl: SELECT ?p1 ?intermediary_1 ?p2 ?intermediary_2 ?p3 WHERE { fma:Right_adrenal_gland ?p1 ?intermediary_1. ?intermediary_1 ?p2 ?intermediary_2. ?intermediary_2 ?p3 fma:Right_kidney. }