Linked Data Modeling for Beginner

Post on 01-Nov-2014

2.813 views 4 download

Tags:

description

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

Transcript of Linked Data Modeling for Beginner

1

Linked Data Modelingfor Beginner

Dr. Myungjin Lee

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

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

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.

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

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

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

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

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

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

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

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

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

13

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

• Which one can be a class?

♂MaleMyungjin Lee

Class

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

15

Class Declaration• rdfs:Class• owl:Class

is aowl:ClassMale

16

rdf:type• “is a” relationship

rdf:typeowl:ClassMale

17

Class Hierarchy• rdfs:subClassOf

rdf:type

owl:Class

Male

Person

rdfs:subClassOf

rdf:type

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

19

Create Class

20

Create Class

21

Create Class

Define Properties

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

24

Property Declaration and Hier-archy• rdf:Property

rdf:type

rdf:Property

hasFather

hasParent

rdfs:subPropertyOf

rdf:type

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

26

Create Property

27

Create Property

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

29

Comparing with Database

CREATE TABLE School {

sid number(2) primary key

sname varchar(50)

}

range of ‘sname’

‘sname’ property

domain of ‘sname’

30

Declaration of Property Restrictions

rdfs:range

rdf:Property

Male

hasWife

rdf:type

Female

rdfs:domain

MyungjinLee SujihasWife

rdf:type rdf:type

31

Set Domain and Rage

32

Set Domain and Rage

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

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

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

36

Create Object Property

37

Create Object Property

38

Property Characteristics• Transitive Property

• Symmetric Property

• Functional Property

• inverseOf

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

40

Transitive Property

ancestor

MyungjinLee

SunsinLee

SungkyeLee

ancestor

owl:TransitiveProperty

ancestor

rdf:type

ancestor

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

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

43

Set Characteristic of Property

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

45

Create Instances

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

46

Individual• instances, objects, or member of class

rdf:typeMaleMyungjinLee

owl:Class

rdf:type

Male• MyungjinLee

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

48

Create Individual

49

Create Individual

50

Create Individual

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

52

sameAs Declaration

53

Dr. Myungjin Lee

e-Mail : mjlee@li-st.comTwitter : http://twitter.com/MyungjinLee

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

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

Thanks foryour attention.