Triple Stores www bioontology orgwikiimages66 fRDFTriple Store ppt
Triple Stores www. bioontology. org/wiki/images/6/6 f/RDFTriple. Store. ppt
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 W 3 C 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. , my. SQL) or a custom DB for efficiency.
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, Allegro. Graph, Oracle 11 g Non-Native store: Persistent storage systems set-up to run on third party DBs. Eg. Jena SDB using mysql or postgres
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 W 3 C page on large triple stores for some data on scaling for many stores
Large triple stores
Quads, Quints and Named Graphs Many triple stores support quads for named 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 Tri. G (a turtle/N 3 variant) Allegro. Graph stores quints (S, P, O, C, ID), the ID can be used to attach metadata to a triple
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
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
Example: Sesame is an open source RDF framework with support for RDFS inferencing and querying http: //www. openrdf. org/ Implemented in Java Query languages: Se. RQL, RDQL Triples can be stored in memory, on disk, or in a RDBMS
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
Issues Can we build efficient triple stores around conventional RDBMS technology? What are the performance issues? – Load time? – Interfencing? How well does is scale?
Evaluations Third party evaluations for Sesame, Jena SDB, Virtuoso Oracle 11 g company evaluations Methodology • • LUBM – Lehigh University Bench. Mark DBPedia Multiple Queries Load Times
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: Data. Set 1: 15, 472, 624 triples; 2. 1 GB Data. Set 2: LUBM 50 – 2. 75 Million & LUBM 1000 – 55. 09 Million 3 Queries
Loading Time-Data. Set 1
Results – Query 1 Simple select query – 2 variables
Query 2 Unconstrained Select Query – only predicate was specified.
Query 3 Complex Query – Uses filter
Oracle 11 g – Data. Set 2 Ontology (size) RDFS OWL Prime Triples Time LUBM – 50(6. 8 Million) 2. 75 M 12. 14 min 3. 05 M 8. 01 min LUBM – 1000(133. 6 M) 55. 09 M 7 h 19 m 65. 25 M 7 h 12 m
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.
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 – Bio. Medical Ontologies
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.
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. W 3 C recommendations. Special system needs. Eg. Allegograph needs 64 bit processor.
Phenotype Annotations Jena API Inferencing Jena Model j SDB Jena API Set of Ontologies required for Phenotype Annotationseg. PATO, Fly etc. My. SQL / Virtuoso Phenotype Annotations Jena API Jena Model j Jena API SDB
References [1] http: //esw. w 3. org/topic/Rdf. Store. Benchmarking [2] http: //www 4. 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 Allegro. Graph. 2007 [4]N Bhatia, A Seaborne – ‘Ingestion pipeline for RDF’
- Slides: 24