2

According to the Apache website TDB 'can be used as a high performance RDF store on a single machine'. Reading the documentation I don't see where it stores anything. Is it simply storing each resource in its own file within a defined directory as outlined in this tutorial? If so that seems as if it will not scale very well.

WildBill
  • 9,143
  • 15
  • 63
  • 87
  • 1
    I'm not clear exactly clear what you're asking. RDF is a graph based data representation, where the basic piece of information is the directed edge (a triple) made of a subject, predicate, and object. TDB is a triple store. When you load an RDF document, e.g., with [`tdbloader`](http://jena.apache.org/documentation/tdb/commands.html#tdbloader), you end up with the triples from the document in a database. After the initial setup, you'd typically use SPARQL updates to insert or delete content from the database. – Joshua Taylor Jan 13 '14 at 05:17
  • TDB databases are stored on disk (just like any not in-memory database), so when you're initializing a Java object that gives you access to a TDB store, you might do it by pointing the new Java object at that portion of the disk (in this case, the directory containing the database files). – Joshua Taylor Jan 13 '14 at 05:23

2 Answers2

5

TDB does not only store the file in a specified folder. The content of the file will be indexed. There are several indexes built for one file: One index is built for S P O order, another for e.g., P O S and so on (as I said for each combination).

Those indexes are stored in the specified folder. Depending on the queries, the appropriate indexes will be loaded.

If you add a RDF file to a TDB store, you will see that many files are created. Although this means that the actual content of the file will be stored multiple times (for each index), it will speed up query execution which is often more preferred that minimal storage usage.

hage
  • 5,966
  • 3
  • 32
  • 42
5

The documentation you linked includes a TDB Design link.

This page covers the technical details of what data structures are used internally and how they are stored on disk

RobV
  • 28,022
  • 11
  • 77
  • 119