RDF Triple Stores,
SPARQL and the
 Semantic Web
Presented By:            Supervised By:
Muntazir Mehdi   Dipl.-Inf. Andreas M. Weiner



                                                1
Overview
•   A little about Semantic Web
•   RDF structure and syntax
•   SPARQL structure and syntax
•   Data Management & Storage
    •   Sesame’s Architecture
    •   Vertically Partitioned Approach
    •   RDF-3X

• Summary



                                          2
Web today
• Invented by Sir Tim B. Lee (1989)
• Network of unspecified links between web pages
• Problem : Only humans can process information in a
  meaningful way


                  WP2                      WP4


     WP1                       WP3




                                                   3
The Semantic Web
• Semantic := “Meaning of linguistic terms”
• Coined by Sir Tim B. Lee (1997)
• Web of content, Semantic relations between web
  pages
• Machines can process content
  “The Semantic Web is extension of current Web in
   which information is given well-defined meaning,
 better enabling computers and people to work in co-
                      operation”
Ref: Tim B. Lee, J. Hendler, O. Lassila
“The Semantic Web”, Scientific American, May 2001




                                                       4
Goal of Semantic Web
      “The Semantic Web will bring structure to the
     meaningful content of web pages, creating an
  environment where software agents roaming from
   page to page can readily carry out sophisticated
                     tasks for users.”
  “Properly designed, the Semantic Web can assist in
    the evolution of human knowledge as a whole.”
Ref: Tim B. Lee, J. Hendler, O. Lassila
“The Semantic Web”, Scientific American, May 2001




         WHAT?                          WHERE?      WHEN?



                                                            5
Semantic Web Layers




                      6
Information
                 Representation
• Using XML
• Advantage: A lot of parsers and validators are
  available
• But: A single domain of knowledge can be coded
  with multiple possibilities.
• Solution:
      “Resource Description Framework (RDF) is a
  framework and standard data interchange model
      belonging to the family of World Wide Web
   Consortium (W3C) for modeling and representing
                      information”
Ref: Graham Klyne, Jeremy J. Carroll, Brian McBride.
Resource Description Framework (RDF): Concepts and Abstract Syntax, W3C
Recommendation. 2004.
                                                                          7
Resource Description
       Framework (RDF)

• Two parts of RDF:
  •   RDF Model
               a set of statements := triples, directed graphs
  •   RDF Syntax
               Serialization of RDF as XML




                                                                 8
RDF Model
• Statement
    “Technical University Kaiserslautern is located in
                     Kaiserslautern”
• Triple
   <TU Kaiserslautern><isLocatedIn><Kaiserslautern>

• Directed Graph




                                                         9
RDF Model (cont.)
• Some more statements:

    “Technical University Kaiserslautern is located in Kaiserslautern”
        “University of Kaiserslautern was founded in July, 1970”
  “Kaiserslautern University has a department of Computer Science”


• Problem: Many names of one resource
• Solution: Identification (URI)
• RDF Terminology:
  o Subject (Resource)
  o Predicate (Property)
  o Object (Value)


                                                                         10
RDF Model: An example




                        11
RDF Syntax




             12
SPARQL: Query language
      for RDF
• Recursive acronym for SPARQL Protocol and RDF
  Query Language
• Queries may contain triple patterns, conjunctions,
  disjunctions and optional patterns
• Available since 2008 as W3C Recommendation
• Query Forms:
   o   SELECT: return value of mapped variable in a pattern
   o   ASK: returns Boolean value with respect to the query match
   o   CONSTRUCT: returns graph by substituting value
   o   DESCRIBE: returns graph of a match




                                                                    13
SPARQL: An example
• Query




• Output




                        14
Sesame’s Architecture
•   Open source standard framework for RDF data processing;
    storing, querying and reasoning
•   Implementation on:




                                                              15
Sesame’s Functional
            Modules
• Query Module




• Admin Module
  o Incrementally add RDF(S) data
  o Cleaning up repository



• RDF Export Module
  o Exports RDF(S) data/schema/both as serialized XML




                                                        16
Property Table




                 17
Vertically partitioned
      approach




                         18
RDF-3X
• 3 Salient features of RDF-3X:

1. A Storage implementation for RDF which requires
   no further tuning

2. A query processor

3. A query optimizer




                                                     19
Summary
•   A shift from syntactic to semantic web
•   Representation of information with RDF
•   SPARQL for querying RDF data
•   Storage mechanisms and RDF data management




                                                 20
Thank you for your
    attention!


                     21

RDF Seminar Presentation

  • 1.
    RDF Triple Stores, SPARQLand the Semantic Web Presented By: Supervised By: Muntazir Mehdi Dipl.-Inf. Andreas M. Weiner 1
  • 2.
    Overview • A little about Semantic Web • RDF structure and syntax • SPARQL structure and syntax • Data Management & Storage • Sesame’s Architecture • Vertically Partitioned Approach • RDF-3X • Summary 2
  • 3.
    Web today • Inventedby Sir Tim B. Lee (1989) • Network of unspecified links between web pages • Problem : Only humans can process information in a meaningful way WP2 WP4 WP1 WP3 3
  • 4.
    The Semantic Web •Semantic := “Meaning of linguistic terms” • Coined by Sir Tim B. Lee (1997) • Web of content, Semantic relations between web pages • Machines can process content “The Semantic Web is extension of current Web in which information is given well-defined meaning, better enabling computers and people to work in co- operation” Ref: Tim B. Lee, J. Hendler, O. Lassila “The Semantic Web”, Scientific American, May 2001 4
  • 5.
    Goal of SemanticWeb “The Semantic Web will bring structure to the meaningful content of web pages, creating an environment where software agents roaming from page to page can readily carry out sophisticated tasks for users.” “Properly designed, the Semantic Web can assist in the evolution of human knowledge as a whole.” Ref: Tim B. Lee, J. Hendler, O. Lassila “The Semantic Web”, Scientific American, May 2001 WHAT? WHERE? WHEN? 5
  • 6.
  • 7.
    Information Representation • Using XML • Advantage: A lot of parsers and validators are available • But: A single domain of knowledge can be coded with multiple possibilities. • Solution: “Resource Description Framework (RDF) is a framework and standard data interchange model belonging to the family of World Wide Web Consortium (W3C) for modeling and representing information” Ref: Graham Klyne, Jeremy J. Carroll, Brian McBride. Resource Description Framework (RDF): Concepts and Abstract Syntax, W3C Recommendation. 2004. 7
  • 8.
    Resource Description Framework (RDF) • Two parts of RDF: • RDF Model a set of statements := triples, directed graphs • RDF Syntax Serialization of RDF as XML 8
  • 9.
    RDF Model • Statement “Technical University Kaiserslautern is located in Kaiserslautern” • Triple <TU Kaiserslautern><isLocatedIn><Kaiserslautern> • Directed Graph 9
  • 10.
    RDF Model (cont.) •Some more statements: “Technical University Kaiserslautern is located in Kaiserslautern” “University of Kaiserslautern was founded in July, 1970” “Kaiserslautern University has a department of Computer Science” • Problem: Many names of one resource • Solution: Identification (URI) • RDF Terminology: o Subject (Resource) o Predicate (Property) o Object (Value) 10
  • 11.
    RDF Model: Anexample 11
  • 12.
  • 13.
    SPARQL: Query language for RDF • Recursive acronym for SPARQL Protocol and RDF Query Language • Queries may contain triple patterns, conjunctions, disjunctions and optional patterns • Available since 2008 as W3C Recommendation • Query Forms: o SELECT: return value of mapped variable in a pattern o ASK: returns Boolean value with respect to the query match o CONSTRUCT: returns graph by substituting value o DESCRIBE: returns graph of a match 13
  • 14.
    SPARQL: An example •Query • Output 14
  • 15.
    Sesame’s Architecture • Open source standard framework for RDF data processing; storing, querying and reasoning • Implementation on: 15
  • 16.
    Sesame’s Functional Modules • Query Module • Admin Module o Incrementally add RDF(S) data o Cleaning up repository • RDF Export Module o Exports RDF(S) data/schema/both as serialized XML 16
  • 17.
  • 18.
  • 19.
    RDF-3X • 3 Salientfeatures of RDF-3X: 1. A Storage implementation for RDF which requires no further tuning 2. A query processor 3. A query optimizer 19
  • 20.
    Summary • A shift from syntactic to semantic web • Representation of information with RDF • SPARQL for querying RDF data • Storage mechanisms and RDF data management 20
  • 21.
    Thank you foryour attention! 21