SesameSesameA generic architecture for storing and querying RDF A generic architecture for storing and querying RDF and RDFsand RDFs
2008. 12. 08
Written by Jeen Broekstra, Arjohn Kampman
Summarized by Gihyun Gong
Copyright 2008 by CEBT
About Sesame projectAbout Sesame project
Developed by IST On-To-Knowledge project that ran from 1999 to 2002
Focused on Knowledge and Contents Technology, Software Technology
Now, it is further developed and maintained by Aduna in cooperation with NLnet Foundation, developers from Ontotext
Copyright 2008 by CEBT
What is Sesame?What is Sesame?
Sesame is an open source Java framework for storing, querying and reasoning with RDF and RDF Schema
It can be used as:
Standalone Server: A database for RDF and RDF Schema
Java Library: For applications that need to work with RDF internally
Sesame is similar to Jena
Supports triple storage
Supports reasoning
Supports Web services
Copyright 2008 by CEBT
Sesame’s ArchitectureSesame’s Architecture
Repository
Repository Abstraction Layer (RAL)
Admin Module Export ModuleQuery Module
HTTP Protocol Handler SOAP Protocol Handler
Sesa
me
SO
AP
HTTP
Clients Clients
Copyright 2008 by CEBT
The RepositoryThe Repository
DBMSs Currently, Sesame is able to use
– PostgreSQL
– MySQL
– Oracle (9i or newer)
Existing RDF stores RDF files RDF network services
Using multiple sesame server to retrieve results for queries This opens up the possibility of a highly distributed
architecture for RDF storing and querying
Copyright 2008 by CEBT
Repository Abstraction Layer Repository Abstraction Layer (RAL)(RAL)
RAL offers stable, high-level interface for talking to
repositories
It is defined by an API that offers these functionalities:
Add data
Retrieve data
Delete data
Data is returned in streams (Scalability)
Only small amount of data is kept in memory
Suitable for use in highly constrained environments such as portable
devices
Caching data (Performance)
E.g. caching RDF schema data which is needed very frequently
Copyright 2008 by CEBT
Admin ModuleAdmin Module
Allows inserting or deleting RDF data in repository
Retrieves its information from an RDF(S) source, and parses it using an RDF parser
Checks each (S, P, O) statement for consistency and infers implied information if necessary for instance:
If P equals type, it infers that O must be a class.
If P equals subClassOf, it infers that S and O must be classes.
If P equals subPropertyOf, then it infers that both S and O must be properties.
If P equals domain or range, then it infers that S must be a property and O must be a class
Copyright 2008 by CEBT
Query ModuleQuery Module
Evaluates RQL queries posed by the user It is independent of the underlying repository
Can not use optimizations and query evaluations offered by specific DBMSs
RQL queries are translated into a set of calls to the RAL e.g. when a query contains a join operation over two
subqueries, each of the subqueries is evaluated, and the join operation is then executed by the query engine on the results
Copyright 2008 by CEBT
RDF Export ModuleRDF Export Module
This module allows for the extraction of the complete schema and/or data from a model in RDF format
It supplies the basis for using Sesame with other RDF tools
Copyright 2008 by CEBT
SeRQL (Sesame RDF Query SeRQL (Sesame RDF Query Language)Language)
Extension of RQL
Some of the built-in predicates:
{X} serql:directSubClassOf {Y}
{X} serql:directSubPropertyOf {Y}
Some of the built-in functions
isLiteral()
isResource()
Copyright 2008 by CEBT
Important Features of SesameImportant Features of Sesame
Portability It is written completely in Java
Repository independence Provides RAL
Extensibility Other functional modules can be created and be
plugged in it
Flexible communication by using protocol handlers The architecture separates the communication
details from the actual functionality through the use of protocol handlers
Copyright 2008 by CEBT
Using PostgreSQL as RepositoryUsing PostgreSQL as Repository
PostgreSQL is an open-source object-relational DBMS
It supports subtable relations between its tables
Subtable relations are also transitive
These relations can be used to model the subsumption reasoning of RDF schema.
Copyright 2008 by CEBT
Example RDF Schema & DataExample RDF Schema & Data
Writer
FamousWriter
…/ISBN00023423442…/twain/mark
BookhasWritten
Schema
type
hasWritten
type
subClassOf
rangedomain
Data
Copyright 2008 by CEBT
Storing Schema Storing Schema (PostgreSQL)(PostgreSQL)
uri
ResourceWriterFamousWriterBook
uri
hasWritten
source target
WriterFamousWriterBook
ResourceWriterResource
source target
hasWritten Writer
source target
hasWritten Book
source target
Class SubClassOf SubPropertyOf
Property Domain Range
Copyright 2008 by CEBT
uri
uri uri
…/ISBN00023423442
uri
…/twain/mark source target
…/twain/mark …/ISBN00023423442
FamousWriter
WriterBook
Resource
hasWritten
Storing DataStoring Data (PostgreSQL) (PostgreSQL)
Copyright 2008 by CEBT
Using MySQLUsing MySQL
Copyright 2008 by CEBT
Scalability IssuesScalability Issues
An experiment using Sesame:
Uploading and querying a collection of nouns from Wordnet (http://www.semanticweb.org/library)
– Consisting of about 400,000 RDF statements.
Using a workstation (Sun UltraSPARC 5, 256MB RAM)
Uploading the Wordnet nouns took 94 minutes.
Querying was quite slow (in MySQL)
– Because data is distributed over multiple tables, and retrieving data needs doing many joins on tables
Copyright 2008 by CEBT
Future WorkFuture Work
Transaction Rollback Support
Aims an ACID compliant storage system
Versioning support
Adding and extending functional modules
Support ‘Update’ operation
DAML+OIL support
Copyright 2008 by CEBT
Comparison with others Comparison with others
Database Compatibility
API Compatibility
Copyright 2008 by CEBT
Comparison with othersComparison with others
Tool Support
Query Language Support
Copyright 2008 by CEBT
Comparison with othersComparison with others
Reasoning level and Scalability
System Reasoning Scalability
Jena OWL-DL 170 million
Sesame RDFS 7 million
Mulgara OWL-Lite 50 million
AllegroGraph OWL 100 million
Copyright 2008 by CEBT
ReferencesReferences
Sesame : A Generic architecture for storing and querying RDF and RDFs, http://sesame.aidministrator.nl/
Create Scalable Semantic Applications with Database-Backed RDF Stores, www.devx.com
OpenRDF - Sesame Benchmark, http://bklab.snu.ac.kr/blog/kwangsub/53