Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Linked Data Modeling for Beginner
1. Linked Data Modeling
for Beginner
Dr. Myungjin Lee
http://www.industryleadersmagazine.com/wp-content/uploads/2011/03/j0401617.jpg
1
2. Linked Data
• Linked data describes a method of publishing
structured data so that it can be interlinked and become
more useful.
The Semantic Web isn't just about putting data
on the web. It is about making links, so that a
person or machine can explore the web of data.
With linked data, when you have some of it,
you can find other, related, data.
- A roadmap to the Semantic Web by Tim Berners-Lee
2
3. Four Principles of Linked Data
1. Use URIs to identify things.
2. Use HTTP URIs so that these things can be referred to
and looked up ("dereferenced") by people and user
agents.
3. Provide useful information about the thing when its
URI is dereferenced, using standard formats such as
RDF/XML.
4. Include links to other, related URIs in the exposed
data to improve discovery of other related information
on the Web.
3
4. 5 Star Linked Data
4
★ Available on the web (whatever format) but with an open
licence, to be Open Data
★★ Available as machine-readable structured data (e.g. excel
instead of image scan of a table)
★★★ as (2) plus non-proprietary format (e.g. CSV instead of
excel)
★★★★ All the above plus, Use open standards from W3C (RDF
and SPARQL) to identify things, so that people can point at
your stuff
★★★★★ All the above, plus: Link your data to other people’s data to
provide context
5. What do we know?
an elemental syntax
for content structure
within documents
a simple language
for expressing data models,
which refer to objects ("resources")
and their relationships
more vocabulary
for describing properties and classes
a vocabulary for describing
properties and classes
of RDF-based resources
a protocol and query
language
for semantic web data
sources
to exchange rules
between many
"rules languages"
a string of characters used to identify a name or a resource
5
6. URI (Uniform Resource Identifier)
Myungjin Lee
841002-1045617
identifier
name
resident registration number
http://www.semantics.kr/person/mjLee
identifier in the web
6
7. RDF (Resource Description Framework)
• a general method for conceptual description or
modeling of information that is implemented in web
resources, using a variety of syntax formats
has wife
7
http://semantics.kr/myungjinlee http://semantics.kr/hye-jinhan
http://semantics.kr/rel/hasWife
Subject
URI reference
Predicate
URI reference
Object
URI reference or Literal
Triple
8. RDFS (RDF Schema)
• to define classes and properties that may be used to
describe classes, properties and other resources
8
has wife
♂ ♀
is a is a
Male Female
Person
subset ofsubset of
9. OWL (Web Ontology Language)
• knowledge representation languages for authoring
ontologies
• when you need more expressiveness,
– such as,
9
Man Woman∩ = Ø
Person Person
descendant
Person
descendant
descendant
Husband Wife
1:1
10. SPARQL
• Why do we need a query language for RDF?
– Why de we need a query language for RDB?
– to get to the knowledge from RDF
• SPARQL Protocol and RDF Query Language
– to retrieve and manipulate data stored in Resource
Description Framework format
– to use SPARQL via HTTP
10
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name ?email
WHERE {
?person a foaf:Person.
?person foaf:name ?name.
?person foaf:mbox ?email.
}
RDF
Knowledge
Base
?name ?email
Myungjin Lee mjlee@li-st.com
Gildong Hong gildong@daum.net
Grace Byun grace@naver.com
11. Database and Linked Data Modeling
• Database Modeling
• Linked Data Modeling
11
Database
Modeling
Linked Data
Modeling≒
Understanding
Business Process
Extracting
Entities
Discovering
Relations
Defining
Attributes
Determine
Scope
Consider
Reuse
Enumerate
Terms
Define
Classes
Define
Properties
Create
Instances
13. Class
• sets, collections, concepts, or kinds of things
• Which one can be a class?
13
♂
MaleMyungjin Lee
Class
14. Comparing with Database
• Table ≒ Class
14
rrn name affiliation
841002-1045617 Myungjin Lee 10
410203-3983612 Gildong Hong 20
841105-2056143 Grace Byun 10
Person Table
Person Class
sid sname
10 Yonsei Univ.
20 Seoul Univ.
School Table
School Class
18. Label and Comment
• rdfs:label
– to provide a human-readable version of a resource's name
• rdfs:comment
– to provide a human-readable description of a resource
18
rdfs:label
Person person
a living human
rdfs:comment
28. Property Restrictions
• rdfs:domain
– to state that any resource that has a given property is an
instance of one or more classes
• rdfs:range
– to state that the values of a property are instances of one or
more classes
28
Subject Predicate Object
has wife? ?
domain:
what class
for subject
range:
what class
for object
29. Comparing with Database
29
CREATE TABLE School {
sid number(2) primary key
sname varchar(50)
}
range of ‘sname’
‘sname’ property
domain of ‘sname’
30. Declaration of Property Restrictions
30
rdfs:range
rdf:Property
Male
hasWife
rdf:type
Female
rdfs:domain
MyungjinLee Suji
hasWife
rdf:type rdf:type
33. Two Types of Property
• Object Property
– relations between instances of two classes
• Datatype Property
– relations between instances of classes and literals and XML
Schema datatypes
33
has wife
age
30
Object Property
Datatype Property
34. Comparing with Database
34
CREATE TABLE Person {
rrn varchar(14) primary key
name varchar(10)
FOREIGN KEY (affiliation) REFERENCES school(sid)
}
rrn name affiliation
841002-1045617 Myungjin Lee 10
410203-3983612 Gildong Hong 20
841105-2056143 Grace Byun 10
Person Table
sid sname
10 Yonsei Univ.
20 Seoul Univ.
School Table
Datatype Property ObjectProperty
39. Transitive Property
• If a property, P, is specified as transitive then for any x, y,
and z:
• P(x, y) and P(y, z) implies P(x, z)
• Which one can be a Transitive Property?
39
ancestorhasParent
Transitive Property
41. Symmetric Property
• If a property, P, is tagged as symmetric then for any x
and y:
• P(x, y) iff P(y, x)
• Which one can be a Transitive Property?
41
friend
MyungjinLee Peter
owl:SymmetricPropertyfriend
rdf:type
friend
hasWifefriend
42. Functional Property
• If a property, P, is tagged as functional then for all x, y,
and z:
• P(x, y) and P(x, z) implies y = z
• Which one can be a Transitive Property?
42
age
MyungjinLee
owl:FunctionalPropertyage
rdf:type
30
friendage
44. inverseOf
• If a property, P1, is tagged as the owl:inverseOf P2,
then for all x and y:
• P1(x, y) iff P2(y, x)
44
hasParent
MyungjinLee
hasParent
owl:inverseOf
hasChild
Kwangsu
hasChild
47. Comparing with Database
• Row ≒ Individual
47
rrn name affiliation
841002-1045617 Myungjin Lee 10
410203-3983612 Gildong Hong 20
841105-2056143 Grace Byun 10
Person Table
sid sname
10 Yonsei Univ.
20 Seoul Univ.
School Table
Individual of Person Class
Individual of School Class
51. Interlinking
• rdfs:seeAlso
– to indicate a resource that might provide additional
information about the subject resource
• owl:sameAs
– to declare two individuals to be identical
51
My Dataset
MyungjinLee •
DBPedia Dataset
• myung-jin_lee
owl:sameAs