Presentation is loading. Please wait.

Presentation is loading. Please wait.

Triple Stores www.bioontology.org/wiki/images/6/6f/RDFTripleStore.ppt‎

Similar presentations


Presentation on theme: "Triple Stores www.bioontology.org/wiki/images/6/6f/RDFTripleStore.ppt‎"— Presentation transcript:

1 Triple Stores www.bioontology.org/wiki/images/6/6f/RDFTripleStore.ppt‎

2 What is a triple store? A specialized database for RDF triples Can ingest RDF in a variety of formats Supports a query language – SPARQL is the W3C recommendation – Other RDF query languages exist (e.g., RDQL) – Might or might not do inferencing – Most query languages don’t handle inserts Triple stored in memory in a persistent backend Persistence provided by a relational DBMS (e.g., mySQL) or a custom DB for efficiency.

3 Architectures Based on their implementation, can be divided into several broad categories : In-memory, Native store, Non-native store In Memory : RDF Graph is stored as triples in main – memory Native store: Persistent storage systems with their own implementation of databases. E,g., JENA TDB, Sesame Native, Virtuoso, AllegroGraph, Oracle 11g Non-Native store: Persistent storage systems set-up to run on third party DBs. Eg. Jena SDB using mysql or postgres

4 Architecture trade-offs In memory is fastest, obviously, but load time has to be factored in Native stores are fast, scalable, and popular now Non-native stores may be better if you have a lot of updates and/or need good concurrency control See the W3C page on large triple stores for some data on scaling for many storeslarge triple stores

5 Large triple stores

6 Quads, Quints and Named Graphs Many triple stores support quads for named graphsnamed graphs A named graph is just an RDF with a URI name often called the context Such a triple store divides its data a default graph and zero or more additional named graphs SPARQL has support for named graphs De facto standards exist for representing quad data, e.g., n-quads and TriG (a turtle/N3 variant)n-quads AllegroGraph stores quints (S,P,O,C,ID), the ID can be used to attach metadata to a triple

7 Example: Jena Framework An open software Java system originally developed by HP (2002-2009) – http://incubator.apache.org/jena/ Moved to Apache when HP Labs discontinued its Semantic Web research program ~2009 Good tutorials – http://incubator.apache.org/jena/getting_started/ Has internal reasoners and can work with DIG compliant reasoners or Pellet. Supports a Native API and SPARQL Joseki is an add-on that provides a SPARQL endpoint via an HTTP interface

8 Jena Features API for reading, processing and writing RDF data in XML, N-triples and Turtle formats; Ontology API for handling OWL and RDFS ontologies; Rule-based inference engine for reasoning with RDF and OWL data sources; Stores to allow large numbers of RDF triples to be efficiently stored on disk; Query engine compliant with the latest SPARQL specification Servers to allow RDF data to be published to other applications using a variety of protocols, including SPARQL

9 Example: Sesame Sesame is an open source RDF framework with support for RDFS inferencing and querying http://www.openrdf.org/ Implemented in Java Query languages: SeRQL, RQL, RDQL Triples can be stored in memory, on disk, or in a RDBMS

10 Example: Stardog http://stardog.com/ by Clark and Parsia Pure Java RDF database (“quad store”) Designed to be lightweight and very fast for in memory stores Performance for complex SPARQL queries Reasoning support via Pellet for OWL DL and query rewriting for OWL 2 QL, EL & RL Command line interface and JAVA API

11 Issues Can we build efficient triple stores around conventional RDBMS technology? What are the performance issues? – Load time? – Interfencing? How well does is scale?

12 Evaluations  Third party evaluations for Sesame, Jena SDB, Virtuoso  Oracle 11g company evaluations  Methodology LUBM – Lehigh University BenchMark DBPedia Multiple Queries Load Times

13 Evaluations  DB Pedia – Database of structured information extracted from Wikipedia. Information about places, persons, music albums and films[2]  LUBM – Synthetically generated RDF data containing universities, departments, students etc.[1]  Dataset size:  DataSet1: 15,472,624 triples; 2.1 GB  DataSet 2: LUBM 50 – 2.75 Million & LUBM 1000 – 55.09 Million  3 Queries

14 Loading Time-DataSet1

15 Results – Query 1 Simple select query – 2 variables

16 Query 2 Unconstrained Select Query – only predicate was specified.

17 Query 3 Complex Query – Uses filter

18 Oracle 11g – DataSet 2 Ontology (size)RDFSOWL Prime TriplesTimeTriplesTime LUBM – 50(6.8 Million)2.75 M12.14 min3.05 M8.01 min LUBM – 1000(133.6 M)55.09M7h 19m65.25M7h 12m

19 Observations Native Stores perform better than systems using third party stores. Optimizations are possible  Each of the systems uses different database layouts. Virtuoso – OGPS,POGS,PSOG,SOPG SDB – SPO,GSPO  Hashing on SDB is very bad.

20 Open Research Issues Inferencing[4] Present common implementations: Make a number of small queries to propagate the effects of rule firing. Each of these queries creates an interaction with the database. Not very efficient Approaches Snapshot the contents of the database-backed model into RAM for the duration of processing by the inference engine. Performing inferencing in-stream. Precompute the inference closure of ontology and analyze the in-coming data-streams, add triples to it based on your inference closure. Assumes rigid seperation of the RDF Data(A-box) and the Ontology data(T-box) Even this maynot work for very large ontologies – BioMedical Ontologies

21 Open Research Issues  Query Optimization Third party stores undo’s any optimization done at the API level. Better performance of native stores points to that direction. Some work in optimizing SPARQL queries for in-memory story.

22 Which RDF store to choose for an app? Frequency of loads that the application would perform. Single scaling factor and linear load times. Level of inferencing. Support for which query language. W3C recommendations. Special system needs. Eg. Allegograph needs 64 bit processor.

23 Phenotype Annotations Set of Ontologies required for Phenotype Annotationseg. PATO, Fly etc. j Jena ModelSDB MySQL / Virtuoso Phenotype Annotations Jena API Inferencing Jena API j Jena ModelSDB

24 References [1] http://esw.w3.org/topic/RdfStoreBenchmarking [2] http://www4.wiwiss.fu-berlin.de/benchmarks-200801/ [3] Kurt Rohloff et al.: An Evaluation of Triple-Store Technologies for Large Data Stores. Comparing Sesame, Jena and AllegroGraph. 2007 [4]N Bhatia, A Seaborne – ‘Ingestion pipeline for RDF’


Download ppt "Triple Stores www.bioontology.org/wiki/images/6/6f/RDFTripleStore.ppt‎"

Similar presentations


Ads by Google