database support for semantic web

26
Database Support for Semantic Web Masoud Taghinezhad Omran [email protected] Sharif University of Technology Computer Engineering Department Fall 2005

Upload: dixon

Post on 19-Jan-2016

38 views

Category:

Documents


1 download

DESCRIPTION

Database Support for Semantic Web. Masoud Taghinezhad Omran [email protected] Sharif University of Technology Computer Engineering Department Fall 2005. Outline. Introduction RDF storage in Relational Database RDF storage in OO Database Examples of Implementation - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Database Support for Semantic Web

Database Support for Semantic Web

Masoud Taghinezhad [email protected]

Sharif University of TechnologyComputer Engineering Department

Fall 2005

Page 2: Database Support for Semantic Web

Outline

Introduction RDF storage in Relational Database RDF storage in OO Database Examples of Implementation Evaluation of Methods References

Page 3: Database Support for Semantic Web

Introduction Basic ontology languages are influenced by

RDF. RDF has simple directed graph data model

which is described by a set of triples. Inferred statements from RDFS and

ontology languages could be added. So, It is important to select the best

solution for storing and retrieving RDF information.

A common technique is using Relational Database.

Page 4: Database Support for Semantic Web

RDF storage in Relational Database

First: How the table design should be for storing RDF triples?

Storage Methods: Horizontal Table Vertical Table Horizontal Class Table Per Property Hybrid approach

Page 5: Database Support for Semantic Web

Horizontal Table Use one universal table in the database Fields of the table are individual’s ID, the

name of source class and the value of all properties.

Also it is possible to use a table to represent each ontology

Page 6: Database Support for Semantic Web

Horizontal table (Benefits and Drawbacks)

Benefits: Saving subject and predicate only once Short query time Simple structure

Drawbacks: Large number of columns Property value limits Sparsity Maintenance difficulty Long load time

Page 7: Database Support for Semantic Web

Vertical table There is one universal table Only three fields are in the table

Subject Predicate Object

Page 8: Database Support for Semantic Web

Vertical table (Benefits and Drawbacks)

Benefits: Very simple structure Easy maintenance Short load time Constant column numbers

Drawbacks: Long query time Some queries are difficult No database column type suitable for all literal

values. So the value will be stored as string.

Page 9: Database Support for Semantic Web

Horizontal class Similar to Horizontal table approach but

smaller Uses a separate table for each class of the

ontology Every table contains fields for properties

which have rdfs:domain value equal to representing class

Page 10: Database Support for Semantic Web

Horizontal class (Benefits and Drawbacks)

Benefits: Less sparsity Short query time

Drawbacks: Properties without explicit domain should

be included in all tables.

Page 11: Database Support for Semantic Web

Table per property Uses one table for each property Instances of all classes will be stored in the

table for property “Type”

Page 12: Database Support for Semantic Web

Table per property (Benefits and Drawbacks)

Benefits: Short time for simple queries Decrease in size of tables

Drawbacks: Increase in number of tables Complex queries are time consuming

Page 13: Database Support for Semantic Web

Hybrid approach

Combines different approaches Increase in efficiency than using each

single approach Decrease some limits and drawbacks

of each single approach Frequently used approach in

implementations

Page 14: Database Support for Semantic Web

RDF storage in Relational Database (Example)

DLDB Project:A knowledge base system that extends a relational database management system with additional capabilities for DAML+OIL inference.

Jena:A semantic web programmers’ toolkit

Page 15: Database Support for Semantic Web

DLDB project: A hybrid approach which combines property table

and horizontal class approaches For ontologies of moderate number of classes and

simple queries this approach will have good performance

Uses Microsoft Access as relational database and FaCT as reasoner

Page 16: Database Support for Semantic Web

DLDB project (cont.) Capable of taxonomic inference using rdfs:subClassOf

and rdfs:type and rdfs:subPropertyOf with viewsExample:

The view defined for “student” class:

Page 17: Database Support for Semantic Web

DLDB project (cont.)

Capable of computing class subsumption using a FaCT DL reasoner

First it computes the subsumptions and adds them to the model then creates class views.

Page 18: Database Support for Semantic Web

Jena: A hybrid approach which combines

Horizontal table and vertical table approaches

Uses denormalized vertical table. Short literal values and resource URIs are stored directly in vertical tables and those exceed a threshold is stored in separate tables.

Jena has a mining tool that discovers patterns in RDF graph and RDF query log; So can suggest which properties to store together. example

Page 19: Database Support for Semantic Web

Jena (Cont.)

By Jena we can develop application-specific Storage for RDF

Inferencing is also supported by Jena through inference graphs. Inferred statements will be stored in table.

Page 20: Database Support for Semantic Web

Other RDF stores implemented with relational database

KAON Parka Database RDFSuite Sesame and SAIL TAP

Page 21: Database Support for Semantic Web

RDF storage in object-oriented database

To support semantic interpretation, implementations on relational database will map the graph model onto storage structure. And in order to query the semantics the graph has to be constructed from triples.

Storing RDF data as a graph by OODB has advantages such as: Storage design will be simplified because of storing

graph directly. Graph interpretation will be done without mapping The relationship between RQL and OQL is used for

query processing.

Page 22: Database Support for Semantic Web

Querying RDF(S)

1. Querying the structure level Triple data model is in this level

The best query language known is RDQL

2. Querying the semantic level Graph data model is in this level RQL is the first standardized query

Page 23: Database Support for Semantic Web

Querying RDF(S) Example

Querying RDF data with RDQL SELECT ?x WHERE (?x, <type>, <Document>) SELECT ?x WHERE (?x, <type >, ?c1) , (?c2, <subClassOf>, <Document>) AND

?c1=?c2 Querying RDF data with RQL

SELECT y FROM y type Document SELECT $y FROM {:$y }. Type Document

Page 24: Database Support for Semantic Web

OO-Store, RDF storage on OODB Uses FastObject as object-oriented database system A statement is created by the resource object

referencing the value object using a property object

Page 25: Database Support for Semantic Web

OO-Store vs. Sesame The result of this approach was compared by result

of sesame using different queries It showed that OO-Store approach has much better

performance

Page 26: Database Support for Semantic Web

Refrences V.Bonstrom, A.Hinze, H.Schweppe. “Storing

RDF as a Graph” A.Pan, J.Heflin. “DLDB: Estending Relational

Database to Support Semantic Web Queries”

Oracle USA Inc. “RDF Support in Oracle” K.Wilkinson, C.Sayers, H.Kuno, D.Reynolds,

L.Ding. “Supporting Scalable, Persistent Semantic Web Application”

D.Becket, J.Grant. “Mapping Semantic Web Data With RDBMSes”