Victor Guo
Victor Guo

Reputation: 41

Apache Jena: What is a RDF Dataset?

I am new to Semantic Web and I have a very basic question about the JENA RDF Dataset. I read it from the documentation that a dataset is a collection of graphs (or Models in the Java API). If I view the graph (the model) as a RDF Alternative to Relational DB's 'Table', can I view the dataset as a 'Database' ?

If so, then with TDB I should be able to create multiple datasets. However in the documentation it says 'Every dataset is obtained via TDBFactory.createDataset(Location) within a JVM is the same dataset.' (http://jena.apache.org/documentation/tdb/datasets.html). I also recall that the documentation said somewhere that the TDB does not support multiple JVM now. Does that mean with TDB I can create ONLY ONE dataset?

Upvotes: 0

Views: 1793

Answers (1)

Victor Guo
Victor Guo

Reputation: 41

This is Andy's answer to my question in the jena users mailing list. Thanks, Andy.

Hi, Everyone

I am new to Semantic Web and I have a very basic question about the JENA RDF Dataset. I read it from the documentation that a dataset is a collection of graphs (or Models in the Java API). If I view the graph (the model) as a RDF Alternative to Relational DB's 'Table', can I view the dataset as a 'Database' ?

yes - sort of.

If so, then with TDB I should be able to create multiple datasets. However in the documentation it says 'Every dataset is obtained via TDBFactory.createDataset(Location) within a JVM is the same dataset.' (http://jena.apache.org/documentation/tdb/datasets.html).

... for the same "location" argument ...

TDBFactory.createDataset("DB1") ; TDBFactory.createDataset("DB2") ;

are different datasets

I also recall that the documentation said somewhere that the TDB does not support multiple JVM now. Does that mean with TDB I can create ONLY ONE dataset?

TDB is the core database engine, and when used directly, you are using in a kind of embedded mode.

You can use Jena Fuseki for sharing a dataset between applications (just like you might share an SQL database between apps, except it's HTTP not JDBC).

Andy

Upvotes: 4

Related Questions