linked data modeling for beginner

53
Linked Data Modeling for Beginner Dr. Myungjin Lee w.industryleadersmagazine.com/wp-content/uploads/2011/03/j0401617.jpg 1

Upload: myungjin-lee

Post on 01-Nov-2014

2.813 views

Category:

Education


4 download

DESCRIPTION

This slide describes ontology modeling for beginner to publish linked data.

TRANSCRIPT

Page 1: Linked Data Modeling for Beginner

1

Linked Data Modelingfor Beginner

Dr. Myungjin Lee

http://www.industryleadersmagazine.com/wp-content/uploads/2011/03/j0401617.jpg

Page 2: Linked Data Modeling for Beginner

2

Linked Data• Linked data describes a method of publishing struc-

tured 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

Page 3: Linked Data Modeling for Beginner

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.

Page 4: Linked Data Modeling for Beginner

4

5 Star Linked Data

★ 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 ex-cel)

★★★★ 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

Page 5: Linked Data Modeling for Beginner

5

What do we know?

an elemental syntaxfor content structurewithin documents

a simple languagefor expressing data models,

which refer to objects ("resources")and their relationships

more vocabularyfor describing properties and classes

a vocabulary for describingproperties and classes

of RDF-based resources

a protocol and query language

for semantic web data sources

to exchange rulesbetween many

"rules languages"

a string of characters used to identify a name or a resource

Page 6: Linked Data Modeling for Beginner

6

URI (Uniform Resource Identi-fier)

Myungjin Lee

841002-1045617

identifier

name

resident registration number

http://www.semantics.kr/person/mjLee

identifier in the web

Page 7: Linked Data Modeling for Beginner

7

RDF (Resource Description Framework)

• a general method for conceptual description or model-ing of information that is implemented in web re-sources, using a variety of syntax formats

has wife

http://semantics.kr/myungjinlee http://semantics.kr/hye-jinhanhttp://semantics.kr/rel/hasWife

Subject

URI reference

Predicate

URI reference

Object

URI reference or Literal

Triple

Page 8: Linked Data Modeling for Beginner

8

RDFS (RDF Schema)• to define classes and properties that may be used to de-

scribe classes, properties and other resources

has wife

♂ ♀is a is a

Male Female

Person

subset ofsubset of

Page 9: Linked Data Modeling for Beginner

9

OWL (Web Ontology Language)• knowledge representation languages for authoring on-

tologies

• when you need more expressiveness,– such as,

Man Woman∩ = Ø

Person Persondescendant

Persondescendant

descendant

Husband Wife1:1

Page 10: Linked Data Modeling for Beginner

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 Descrip-

tion Framework format– to use SPARQL via HTTP

PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?name ?emailWHERE { ?person a foaf:Person. ?person foaf:name ?name. ?person foaf:mbox ?email.}

RDF Knowledge

Base

?name ?email

Myungjin Lee [email protected]

Gildong Hong [email protected]

Grace Byun [email protected]

Page 11: Linked Data Modeling for Beginner

11

Database and Linked Data Modeling

• Database Modeling

• Linked Data Modeling

DatabaseModeling

Linked DataModeling≒

Understanding Business Process

Extracting Enti-ties

Discovering Re-lations

Defining At-tributes

Determine Scope

Consider Reuse

Enumerate Terms

Define Classes

Define Properties

Create In-stances

Page 12: Linked Data Modeling for Beginner

Define Classeshttp://philanthropicdirectory.org/sites/all/themes/magnanimous/images/taxonomy-tree-huge.jpg

Page 13: Linked Data Modeling for Beginner

13

Class• sets, collections, concepts, or kinds of things

• Which one can be a class?

♂MaleMyungjin Lee

Class

Page 14: Linked Data Modeling for Beginner

14

Comparing with Database• Table ≒ Class

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

Page 15: Linked Data Modeling for Beginner

15

Class Declaration• rdfs:Class• owl:Class

is aowl:ClassMale

Page 16: Linked Data Modeling for Beginner

16

rdf:type• “is a” relationship

rdf:typeowl:ClassMale

Page 17: Linked Data Modeling for Beginner

17

Class Hierarchy• rdfs:subClassOf

rdf:type

owl:Class

Male

Person

rdfs:subClassOf

rdf:type

Page 18: Linked Data Modeling for Beginner

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

rdfs:labelPerson person

a living humanrdfs:comment

Page 19: Linked Data Modeling for Beginner

19

Create Class

Page 20: Linked Data Modeling for Beginner

20

Create Class

Page 21: Linked Data Modeling for Beginner

21

Create Class

Page 22: Linked Data Modeling for Beginner

Define Properties

http://www.linkingchain.com/images/p_31848PumpGear.jpg

Page 24: Linked Data Modeling for Beginner

24

Property Declaration and Hier-archy• rdf:Property

rdf:type

rdf:Property

hasFather

hasParent

rdfs:subPropertyOf

rdf:type

Page 25: Linked Data Modeling for Beginner

25

Comparing with Database• Column ≒ Property

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

Property

Page 26: Linked Data Modeling for Beginner

26

Create Property

Page 27: Linked Data Modeling for Beginner

27

Create Property

Page 28: Linked Data Modeling for Beginner

28

Property Restrictions • rdfs:domain

– to state that any resource that has a given property is an in-stance of one or more classes

• rdfs:range– to state that the values of a property are instances of one or

more classes

Subject Predicate Object

has wife? ?

domain:what classfor subject

range:what classfor object

Page 29: Linked Data Modeling for Beginner

29

Comparing with Database

CREATE TABLE School {

sid number(2) primary key

sname varchar(50)

}

range of ‘sname’

‘sname’ property

domain of ‘sname’

Page 30: Linked Data Modeling for Beginner

30

Declaration of Property Restrictions

rdfs:range

rdf:Property

Male

hasWife

rdf:type

Female

rdfs:domain

MyungjinLee SujihasWife

rdf:type rdf:type

Page 31: Linked Data Modeling for Beginner

31

Set Domain and Rage

Page 32: Linked Data Modeling for Beginner

32

Set Domain and Rage

Page 33: Linked Data Modeling for Beginner

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

has wife

age30

Object Property

Datatype Property

Page 34: Linked Data Modeling for Beginner

34

Comparing with Database

CREATE TABLE Person {rrn varchar(14) primary keyname 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

Page 35: Linked Data Modeling for Beginner

35

Object and Datatype Property Declaration

• owl:ObjectProperty• owl:DatatypeProperty

rdfs:range

owl:ObjectProperty

hasWife

rdf:type

Female

rdfs:range

owl:DatatypeProperty

age

rdf:type

xsd:int

Page 36: Linked Data Modeling for Beginner

36

Create Object Property

Page 37: Linked Data Modeling for Beginner

37

Create Object Property

Page 38: Linked Data Modeling for Beginner

38

Property Characteristics• Transitive Property

• Symmetric Property

• Functional Property

• inverseOf

Page 39: Linked Data Modeling for Beginner

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?

ancestorhasParent

Transitive Property

Page 40: Linked Data Modeling for Beginner

40

Transitive Property

ancestor

MyungjinLee

SunsinLee

SungkyeLee

ancestor

owl:TransitiveProperty

ancestor

rdf:type

ancestor

Page 41: Linked Data Modeling for Beginner

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?

friendMyungjinLee Peter

owl:SymmetricPropertyfriendrdf:type

friend

hasWifefriend

Page 42: Linked Data Modeling for Beginner

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?

ageMyungjinLee

owl:FunctionalPropertyagerdf:type

30

friendage

Page 43: Linked Data Modeling for Beginner

43

Set Characteristic of Property

Page 44: Linked Data Modeling for Beginner

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)

hasParentMyungjinLee

hasParentowl:inverseOf

hasChild

Kwangsu

hasChild

Page 45: Linked Data Modeling for Beginner

45

Create Instances

http://fc09.deviantart.net/fs71/i/2011/337/4/2/hero_tv_rp___relation_map_by_niladhevan-d4i0oij.png

Page 46: Linked Data Modeling for Beginner

46

Individual• instances, objects, or member of class

rdf:typeMaleMyungjinLee

owl:Class

rdf:type

Male• MyungjinLee

Page 47: Linked Data Modeling for Beginner

47

Comparing with Database• Row ≒ Individual

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

Page 48: Linked Data Modeling for Beginner

48

Create Individual

Page 49: Linked Data Modeling for Beginner

49

Create Individual

Page 50: Linked Data Modeling for Beginner

50

Create Individual

Page 51: Linked Data Modeling for Beginner

51

Interlinking• rdfs:seeAlso

– to indicate a resource that might provide additional informa-tion about the subject resource

• owl:sameAs – to declare two individuals to be identical

My Dataset

MyungjinLee •

DBPedia Dataset

• myung-jin_lee

owl:sameAs

Page 52: Linked Data Modeling for Beginner

52

sameAs Declaration

Page 53: Linked Data Modeling for Beginner

53

Dr. Myungjin Lee

e-Mail : [email protected] : http://twitter.com/MyungjinLee

Facebook : http://www.facebook.com/mjinlee

SlideShare : http://www.slideshare.net/onlyjiny/

Thanks foryour attention.