SDB Dataset Description

Assembler descriptions for RDF Datasets and individual models are built from Store Descriptions. A dataset assembler just points to the store to use; a model assembler points to the store and identifies the model within the store to use (or use the default model).


The example below creates an in-memory store implemented by HSQLDB.

@prefix rdfs:   <> .
@prefix rdf:    <> .
@prefix xsd:    <> .

@prefix ja:     <> .
@prefix sdb:    <> .

[] ja:loadClass "org.apache.jena.sdb.SDB" .

sdb:DatasetStore rdfs:subClassOf ja:RDFDataset .

<#dataset> rdf:type sdb:DatasetStore ;
    sdb:store <#store> .

<#store> rdf:type sdb:Store ;

A dataset description for SDB is identical to a store description, except the rdf:type is sdb:DatasetStore. A different kind of Java object is created.


To assemble a particular model in a store, especially to work with at the API level rather than at the query level, the following can be added to an assembler description:

# Default graph
<#myModel1> rdf:type sdb:Model ;
    sdb:dataset <#dataset> .

# Named graph
<#myModel2> rdf:type sdb:Model ;
    sdb:namedGraph   data:graph1 ;
    sdb:dataset <#dataset> .

There can several model descriptions in the same file, referring to the same SDB dataset, or to different ones. The Jena assembler interface enables different items to be picked out.

Note that creating a general (ARQ) dataset from models/graph inside an SDB store is not the same as using a datase which is the query interface to the store. It is the the dataset for the store that triggers full SPARQL to SQL translation, not a model.