Chapter 3 RDF Schema - PowerPoint PPT Presentation

About This Presentation
Title:

Chapter 3 RDF Schema

Description:

'eve has a sister who is a 98 year old woman'. The brackets introduce an anonymous resource. 'eve believes that her age is 100'. The braces introduce a reified ... – PowerPoint PPT presentation

Number of Views:100
Avg rating:3.0/5.0
Slides: 24
Provided by: ICS76
Category:
Tags: rdf | chapter | eve | schema

less

Transcript and Presenter's Notes

Title: Chapter 3 RDF Schema


1
Chapter 3RDF Schema
2
Introduction
  • RDF has a very simple data model
  • RDF Schema (RDFS) enriches the data model, adding
    vocabulary and associated semantics for
  • Classes and subclasses
  • Properties and sub-properties
  • Typing of properties
  • Support for describing simple ontologies
  • Adds an object-oriented flavor
  • But with a logic-oriented approach and using
    open world semantics

3
RDF Schema (RDFS)
  • RDFS adds taxonomies forclasses properties
  • subClass and subProperty
  • and some metadata.
  • domain and rangeconstraints on properties
  • Several widely usedKB tools can importand
    export in RDFS
  • Stanford Protégé KB editor
  • Java, open sourced
  • extensible, lots of plug-ins
  • provides reasoning server capabilities

4
RDFS Vocabulary
RDFS introduces the following terms, giving each
a meaning w.r.t. the rdf data model
  • Terms for classes
  • rdfsClass
  • rdfssubClassOf
  • Terms for properties
  • rdfsdomain
  • rdfsrange
  • rdfssubPropertyOf
  • Special classes
  • rdfsResource
  • rdfsLiteral
  • rdfsDatatype
  • Terms for collections
  • rdfsmember
  • rdfsContainer
  • rdfsContainerMem-bershipProperty
  • Special properties
  • rdfscomment
  • rdfsseeAlso
  • rdfsisDefinedBy
  • rdfslabel

5
RDF and RDF Schema
ltrdfsProperty rdfIDnamegt ltrdfsdomain
rdfresourcePersongt lt/rdfsPropertygt ltrdfsCla
ss rdfIDChairgt ltrdfssubclassOf
rdfresource http//schema.org/genPerson
gt lt/rdfsClassgt
ltrdfRDF xmlnsghttp//schema.org/gen
xmlnsuhttp//schema.org/univgt ltuChair
rdfIDjohngt ltgnamegtJohn Smithlt/gnamegt
lt/uChairgt lt/rdfRDFgt
6
RDFS supports simple inferences
New and Improved! 100 Betterthan XML!!
  • An RDF ontology plus some RDF statements may
    imply additional RDF statements.
  • This is not true of XML.
  • Note that this is part of the data model and not
    of the accessing or processing code.

parent a property. person a class. woman subClass
person. mother a property. eve a person a
woman parent cain. cain a person.
_at_prefix rdfs lthttp//www.....gt. _at_prefix
ltgenesis.n3gt. parent rdfsdomain person
rdfsrange person. mother rdfssubProperty
parent rdfsdomain woman
rdfsrange person. eve mother cain.
7
N3 example
Heres how you declare a namespace.
ltgt Is an alias for the URI of this document.
This defines the empty prefix as refering to
this document
  • _at_prefix rdf lthttp//www.w3.org/1999/02/22-rdf-syn
    tax-nsgt.
  • _at_prefix rdfs lthttp//www.w3.org/2000/01/rdf-schem
    agt.
  • _at_prefix ltgt .
  • ltgt rdfscomment This is an N3 example.
  • Person a rdfsClass.
  • Woman a rdfsClass rdfssubClassOf Person.
  • eve a Woman age 100.
  • sister a rdfProperty rdfsdomain Person
    rdfsrange Woman.
  • eve sister a Woman age 98.
  • eve believe eve age 100.
  • is spouse of is sister of eve age 99.
  • eve.sister.spouse age 99.

person is a class. The a syntax is sugar for
rdftype property.
Woman is a class and a subclass of person.
Note the syntax.
eve is a woman whose age is 100.
sister is a property from person to woman
eve has a sister who is a 98 year old woman.
The brackets introduce an anonymous resource.
eve believes that her age is 100. The braces
introduce a reified triple.
the spouse of the sister of eve is 99.
the spouse of the sister of eve is 99.
8
Ex University Lecturers Prefix
  • ltrdfRDF
  • xmlnsrdf"http//www.w3.org/1999/02/22-rdf-synta
    x-ns" xmlnsrdfshttp//www.w3.org/2000/01/rdf-sc
    hema
  • gt

9
Ex University Lecturers -- Classes
  • ltrdfsClass rdfID"staffMember"gt
  • ltrdfscommentgtThe class of staff members
    lt/rdfscommentgt
  • lt/rdfsClassgt
  • ltrdfsClass rdfID"academicStaffMember"gt
  • ltrdfscommentgtThe class of academic staff
    members lt/rdfscommentgt
  • ltrdfssubClassOf rdfresource"staffMember"/gt
  • lt/rdfsClassgt
  • ltrdfsClass rdfID"lecturer"gt
  • ltrdfscommentgt The class of lecturers. All
    lecturers are academic staff members.
  • lt/rdfscommentgt
  • ltrdfssubClassOf rdfresource"academicStaffMemb
    er"/gt
  • lt/rdfsClassgt
  • ltrdfsClass rdfID"course"gt
  • ltrdfscommentgtThe class of courseslt/rdfscommentgt
  • lt/rdfsClassgt

10
Ex University Lecturers -- Properties
  • ltrdfProperty rdfID"isTaughtBy"gt
  • ltrdfscommentgtAssigns lecturers to courses.
    lt/rdfscommentgt
  • ltrdfsdomain rdfresource"course"/gt
  • ltrdfsrange rdfresource"lecturer"/gt
  • lt/rdfPropertygt
  • ltrdfProperty rdfID"teaches"gt
  • ltrdfscommentgtAssigns courses to lecturers.
    lt/rdfscommentgt
  • ltrdfsdomain rdfresource"lecturer"/gt
  • ltrdfsrange rdfresource"course"/gt
  • lt/rdfPropertygt

11
Ex University Lecturers -- Instances
  • ltunilecturer rdfID"949318"
  • uniname"David Billington"
  • unititle"Associate Professor"gt
  • ltuniteaches rdfresource"CIT1111"/gt
  • ltuniteaches rdfresource"CIT3112"/gt
  • lt/unilecturergt
  • ltunilecturer rdfID"949352"
  • uniname"Grigoris Antoniou"
  • unititle"Professor"gt
  • ltuniteaches rdfresource"CIT1112"/gt
  • ltuniteaches rdfresource"CIT1113"/gt
  • lt/unilecturergt
  • ltunicourse rdfID"CIT1111"
  • unicourseName"Discrete Mathematics"gt
  • ltuniisTaughtBy rdfresource"949318"/gt
  • lt/unicoursegt
  • ltunicourse rdfID"CIT1112"
  • unicourseName"Concrete Mathematics"gt
  • ltuniisTaughtBy rdfresource"949352"/gt

12
RDFS vs. OO Models
  • In OO models, an object class defines the
    properties that apply to it
  • Adding a new property means to modify the class
  • In RDF, properties are defined globally and
    arent encapsulated as attributes in the class
    definition
  • One can define new properties without changing
    the class
  • Properties can have properties
  • mother rdfssubPropertyOf parent rdftype
    FamilyRelation.
  • You cant narrow the domain and range of
    properties in a subclass

13
Example
  • _at_prefix rdf lthttp//www.w3.org/1999/02/22-rdf-syn
    tax-nsgt .
  • _at_prefix rdfs lthttp//www.w3.org/2000/01/rdf-schem
    agt .
  • _at_prefix bio lthttp//example.com/biologygt .
  • bioAnimal a rdfsClass.
  • Biooffspring a rdfsProperty
  • rdfsdomain bioAnimal
  • rdfsrange bioAnimal.
  • bioHuman rdfssubClassOf bioAnimal.
  • bioDog rdfssubClassOf bioAnimal.
  • fido a bioDog.
  • john a bioHuman
  • biooffspring fido.

There is no way to say that the offspring of
humans are humans and the offspring of dogs are
dogs.
14
Example
  • Biochild rdfssubPropertyOf biooffspring
  • rdfsdomain bioHuman
  • rdfsrange bioHuman.
  • Biopuppy rdfssubPropertyOf biooffspring
  • rdfsdomain bioDog
  • rdfsrange bioDog.
  • john biochild mary.
  • fido biopuppy rover.

What do we know after each of the last two
triples are asserted?
  • Suppose we also assert
  • john biopuppy rover
  • john biochild fido

15
Not like types in OO systems
  • Classes differ from types in OO systems in how
    they are used.
  • They are not constraints on well-formedness
  • The lack of negation and the open world
    assumption make it impossible to detect
    contradictions
  • Cant say that Dog and Human are disjoint classes
  • Not knowing that there are individuals who are
    both doesnt mean its not true

16
No disjunctions or union types
  • What does this mean?
  • bioCat rdfssubClassOf bioAnimal.
  • biopet a rdfsProperty
  • rdfsdomain bioHuman
  • rdfsrange bioDog
  • rdfsrange bioCat.

17
No disjunctions or union types
  • We have to define the Class explicitly.
  • bioCat rdfssubClassOf bioAnimal
  • rdfssubClassOf bioPet.
  • bioDog rdfssubClassOf bioPet.
  • bioPet rdfssubClassOf bioAnimal.
  • biopet a rdfsProperty
  • rdfsdomain bioPet
  • rdfsrange bioPet

Theres redundancy here. It may or may not be
what we want to say Only dogs and cats can be
pets?. Are all cats pets? What about feral cats?

18
Classes and individuals are not disjoint
  • In OO systems a thing is either a class or object
  • Many KR systems are like this you are either an
    instance or a class, not both.
  • Not so in RDFS
  • bioSpecies rdftype rdfsClass.
  • bioDog rdftype rdfsSpecies rdfssubClassOf
    bioAnimal.
  • fido rdftype bioDog.
  • Adds richness to the language but causes
    problems, too
  • In OWL lite and OWL DL you cant do this.
  • OWL has its own notion of a Class, owlClass

19
Inheritance is simple
  • No defaults, overriding, shadowing
  • What you say about a class is necessarily try of
    all sub-classes
  • A class properties are not inherited by its
    members.
  • Cant say Dogs are normally friendly or even
    All dogs are friendly
  • The meaning of the Dog class is a set of
    individuals

20
Set Based Model Theory Example
World
Interpretation
Model
?
Daisy isA Cow Cow kindOf Animal
Mary isA Person Person kindOf Animal
a
Z123ABC isA Car
b
Mary drives Z123ABC
.....
21
Is RDF(S) better than XML?
  • Q For a specific application, should I use XML
    or RDF?
  • A It depends
  • XML's model is
  • a tree, i.e., a strong hierarchy
  • applications may rely on hierarchy position
  • relatively simple syntax and structure
  • not easy to combine trees
  • RDF's model is
  • a loose collections of relations
  • applications may do database-like search
  • not easy to recover hierarchy
  • easy to combine relations in one big collection
  • great for the integration of heterogeneous
    information

22
Problems with RDFS
  • RDFS too weak to describe resources in sufficient
    detail, e.g.
  • No localised range and domain constraints
  • Cant say that the range of hasChild is person
    when applied to persons and elephant when applied
    to elephants
  • No existence/cardinality constraints
  • Cant say that all instances of person have a
    mother that is also a person, or that persons
    have exactly 2 parents
  • No transitive, inverse or symmetrical properties
  • Cant say that isPartOf is a transitive property,
    that hasPart is the inverse of isPartOf or that
    touches is symmetrical
  • We need RDF terms providing these and other
    features.

23
Conclusions
  • RDF is a simple data model based on a graph
  • Independent on any serialization (e.g., XML or
    N3)
  • RDF has a formal semantics providing a dependable
    basis for reasoning about the meaning of RDF
    expressions
  • RDF has an extensible URI-based vocabulary
  • RDF has an XML serialization and can use values
    represented as XML schema datatypes
  • Anyone can make statements about any resource
    (open world assumption)
  • RDFS builds on RDFs foundation by adding
    vocabulary with well defined semantics (e.g.,
    Class, subClassOf, etc.)
  • OWL addresses some of RDFSs limitations adding
    richness (and complexity).
Write a Comment
User Comments (0)
About PowerShow.com