Andy, Please clarify something. In this reply, you state * Put the ontology in one named graph and the individuals in another one, or the default graph, and hence in the same database? * You can put a single graph from TDB into a general dataset or just work with that one graph (transactions will not work across a mixture of graphs in a dataset).
You then reference the online docs that state: It is possible to use just one of the graphs from the dataset. A common way of working with one graph is to use the default graph of the dataset. My code uses the interface com.hp.hpl.jena.query.Dataset. It allows me to start/stop transactions and to access named models. I can access multiple named models. Isn't a model a graph in the database? Isn't a graph == model == graph ? You say that "transactions will not work across a mixture of graphs in a dataset". So a given com.hp.hpl.jena.query.Dataset object, while it can return multiple named Models, you cannot use them in the same transaction? When you said "a general dataset", are you referring to the default model/graph, which is stored in a triple table in SDB and essentially is using the single default graph managed by TDB/SDB? Some of the wording used, both in the documentation and in your reply, seem vague to me, with multiple interpretations. I don't believe the single sentence "It is possible to use just one of the graphs from the dataset." is true. -----Original Message----- From: Andy Seaborne [mailto:[email protected]] Sent: Wednesday, May 15, 2013 12:39 PM To: [email protected] Subject: Re: Owl Ontology and TDB Individuals On 15/05/13 10:05, Bahador(reza)? OFOGHI wrote: > > > Hi, > > I have developed an OWL Ontology using Jena which includes the general > structure/graph of domain knowledge (only classes and relationships). > I would like to have the individuals/instances in a separate TDB > triplestore since the number of individuals is large. I have no idea > where to start from as I have never worked with TDB. My questions are: > > 1- does anyone know if I can have the ontology and individuals > separate from each other, one in OWL and the latter in TDB? Yes. But can you put the ontology in one named graph and the individuals in another one, or the default graph, and hence in the same database? > 2- if yes, any hints or link to anyweher I can find an example or a > walkthrough explanation of how this can be done? You can put a single graph from TDB into a general dataset or just work with that one graph (transactions will not work across a mixture of graphs in a dataset). https://jena.apache.org/documentation/tdb/assembler.html#graph Andy > > Thanks in advance, BO >
