You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Vishal Sinha <vi...@yahoo.com> on 2013/01/25 06:30:08 UTC
Combined query over different dataset and interlinking btween dataset
Hi,
I have created two Datasets using Jena.
Each Datasets having two or three models.
Lets say triples in Dataset1 are:
x1 y1 z1.
x2 y2 z2.
x3 y3 z3.
x4 y4 z4.
x5 y5 z5.
x6 y6 z6.
Lets say triples in Dataset2 are:
x11 y11 z11.
x21 y22 z22.
x33 y33 z33.
x44 y44 z44.
x55 y55 z55.
x66 y66 z66.
My questions:
- How can I make combined query on these two data-sets, or lets say multiple datasets using Jena ?
- How can I state that 'y22' in Dataset2 is actually same as 'y5' in Dataset1 ? Where should I keep this information?
Thanks,
Vishal
Re: Combined query over different dataset and interlinking btween dataset
Posted by Vishal Sinha <vi...@yahoo.com>.
________________________________
From: Andy Seaborne <an...@apache.org>
To: Vishal Sinha <vi...@yahoo.com>
Cc: "users@jena.apache.org" <us...@jena.apache.org>
Sent: Monday, January 28, 2013 5:16 PM
Subject: Re: Combined query over different dataset and interlinking btween dataset
On 28/01/13 06:24, Vishal Sinha wrote:
>
>
> ------------------------------------------------------------------------
> *From:* Andy Seaborne <an...@apache.org>
> *To:* users@jena.apache.org
> *Sent:* Monday, January 28, 2013 3:25 AM
> *Subject:* Re: Combined query over different dataset and interlinking
> btween dataset
>
> On 25/01/13 06:43, ankur padia wrote:
> > hello vishal,
> >
> > Based on my experience, list of statement would be help full for
> > question 1 and for question 2 some if condition would be required to be
> > specified. And I think "Filter" class would be helpful but as I haven't
> > came across any tutorial on "Filter". As a result it would be like
> hit and
> > try.
> >
> > Regards,
> > Ankur Padia
> >
> >
> > On Fri, Jan 25, 2013 at 11:00 AM, Vishal Sinha
> <vishal.sinha777@yahoo.com <ma...@yahoo.com>>wrote:
> >
> >> Hi,
> >>
> >> I have created two Datasets using Jena.
> >> Each Datasets having two or three models.
> >>
> >> Lets say triples in Dataset1 are:
> >> x1 y1 z1.
> >> x2 y2 z2.
> >> x3 y3 z3.
> >> x4 y4 z4.
> >> x5 y5 z5.
> >> x6 y6 z6.
> >>
> >> Lets say triples in Dataset2 are:
> >> x11 y11 z11.
> >> x21 y22 z22.
> >> x33 y33 z33.
> >> x44 y44 z44.
> >> x55 y55 z55.
> >> x66 y66 z66.
> >>
> >> My questions:
> >> - How can I make combined query on these two data-sets, or lets say
> >> multiple datasets using Jena ?
> >> - How can I state that 'y22' in Dataset2 is actually same as 'y5' in
> >> Dataset1 ? Where should I keep this information?
>
Andy wrote:
> Do the datasets have named graphs in common? If not, then making a
> single dataset with all the data in is one possibility.
>
Vishal wrote:
> Both the datasets has default graph models, not any named graph.
Then you can put both in one dataset, each as a named graph. You can
query a specific graph with GRAPH or the combined grapgs using
unionDefaultGraph.
++++++ Thanks, it works now.
Otherwise, you can create a union graph and put each graph in it. Less
efficient but it depends if you have a lot of data or not (=> TDB
database and several million triples).
Andy
>
> Andy
>
> >>
> >> Thanks,
> >>
> >> Vishal
> >
>
>
>
Re: Combined query over different dataset and interlinking btween
dataset
Posted by Andy Seaborne <an...@apache.org>.
On 28/01/13 06:24, Vishal Sinha wrote:
>
>
> ------------------------------------------------------------------------
> *From:* Andy Seaborne <an...@apache.org>
> *To:* users@jena.apache.org
> *Sent:* Monday, January 28, 2013 3:25 AM
> *Subject:* Re: Combined query over different dataset and interlinking
> btween dataset
>
> On 25/01/13 06:43, ankur padia wrote:
> > hello vishal,
> >
> > Based on my experience, list of statement would be help full for
> > question 1 and for question 2 some if condition would be required to be
> > specified. And I think "Filter" class would be helpful but as I haven't
> > came across any tutorial on "Filter". As a result it would be like
> hit and
> > try.
> >
> > Regards,
> > Ankur Padia
> >
> >
> > On Fri, Jan 25, 2013 at 11:00 AM, Vishal Sinha
> <vishal.sinha777@yahoo.com <ma...@yahoo.com>>wrote:
> >
> >> Hi,
> >>
> >> I have created two Datasets using Jena.
> >> Each Datasets having two or three models.
> >>
> >> Lets say triples in Dataset1 are:
> >> x1 y1 z1.
> >> x2 y2 z2.
> >> x3 y3 z3.
> >> x4 y4 z4.
> >> x5 y5 z5.
> >> x6 y6 z6.
> >>
> >> Lets say triples in Dataset2 are:
> >> x11 y11 z11.
> >> x21 y22 z22.
> >> x33 y33 z33.
> >> x44 y44 z44.
> >> x55 y55 z55.
> >> x66 y66 z66.
> >>
> >> My questions:
> >> - How can I make combined query on these two data-sets, or lets say
> >> multiple datasets using Jena ?
> >> - How can I state that 'y22' in Dataset2 is actually same as 'y5' in
> >> Dataset1 ? Where should I keep this information?
>
Andy wrote:
> Do the datasets have named graphs in common? If not, then making a
> single dataset with all the data in is one possibility.
>
Vishal wrote:
> Both the datasets has default graph models, not any named graph.
Then you can put both in one dataset, each as a named graph. You can
query a specific graph with GRAPH or the combined grapgs using
unionDefaultGraph.
Otherwise, you can create a union graph and put each graph in it. Less
efficient but it depends if you have a lot of data or not (=> TDB
database and several million triples).
Andy
>
> Andy
>
> >>
> >> Thanks,
> >>
> >> Vishal
> >
>
>
>
Re: Combined query over different dataset and interlinking btween dataset
Posted by Vishal Sinha <vi...@yahoo.com>.
________________________________
From: Andy Seaborne <an...@apache.org>
To: users@jena.apache.org
Sent: Monday, January 28, 2013 3:25 AM
Subject: Re: Combined query over different dataset and interlinking btween dataset
On 25/01/13 06:43, ankur padia wrote:
> hello vishal,
>
> Based on my experience, list of statement would be help full for
> question 1 and for question 2 some if condition would be required to be
> specified. And I think "Filter" class would be helpful but as I haven't
> came across any tutorial on "Filter". As a result it would be like hit and
> try.
>
> Regards,
> Ankur Padia
>
>
> On Fri, Jan 25, 2013 at 11:00 AM, Vishal Sinha <vi...@yahoo.com>wrote:
>
>> Hi,
>>
>> I have created two Datasets using Jena.
>> Each Datasets having two or three models.
>>
>> Lets say triples in Dataset1 are:
>> x1 y1 z1.
>> x2 y2 z2.
>> x3 y3 z3.
>> x4 y4 z4.
>> x5 y5 z5.
>> x6 y6 z6.
>>
>> Lets say triples in Dataset2 are:
>> x11 y11 z11.
>> x21 y22 z22.
>> x33 y33 z33.
>> x44 y44 z44.
>> x55 y55 z55.
>> x66 y66 z66.
>>
>> My questions:
>> - How can I make combined query on these two data-sets, or lets say
>> multiple datasets using Jena ?
>> - How can I state that 'y22' in Dataset2 is actually same as 'y5' in
>> Dataset1 ? Where should I keep this information?
Do the datasets have named graphs in common? If not, then making a
single dataset with all the data in is one possibility.
Both the datasets has default graph models, not any named graph.
Andy
>>
>> Thanks,
>>
>> Vishal
>
Re: Combined query over different dataset and interlinking btween
dataset
Posted by Andy Seaborne <an...@apache.org>.
On 25/01/13 06:43, ankur padia wrote:
> hello vishal,
>
> Based on my experience, list of statement would be help full for
> question 1 and for question 2 some if condition would be required to be
> specified. And I think "Filter" class would be helpful but as I haven't
> came across any tutorial on "Filter". As a result it would be like hit and
> try.
>
> Regards,
> Ankur Padia
>
>
> On Fri, Jan 25, 2013 at 11:00 AM, Vishal Sinha <vi...@yahoo.com>wrote:
>
>> Hi,
>>
>> I have created two Datasets using Jena.
>> Each Datasets having two or three models.
>>
>> Lets say triples in Dataset1 are:
>> x1 y1 z1.
>> x2 y2 z2.
>> x3 y3 z3.
>> x4 y4 z4.
>> x5 y5 z5.
>> x6 y6 z6.
>>
>> Lets say triples in Dataset2 are:
>> x11 y11 z11.
>> x21 y22 z22.
>> x33 y33 z33.
>> x44 y44 z44.
>> x55 y55 z55.
>> x66 y66 z66.
>>
>> My questions:
>> - How can I make combined query on these two data-sets, or lets say
>> multiple datasets using Jena ?
>> - How can I state that 'y22' in Dataset2 is actually same as 'y5' in
>> Dataset1 ? Where should I keep this information?
Do the datasets have named graphs in common? If not, then making a
single dataset with all the data in is one possibility.
Andy
>>
>> Thanks,
>>
>> Vishal
>
Re: Combined query over different dataset and interlinking btween dataset
Posted by ankur padia <pa...@gmail.com>.
hello vishal,
Based on my experience, list of statement would be help full for
question 1 and for question 2 some if condition would be required to be
specified. And I think "Filter" class would be helpful but as I haven't
came across any tutorial on "Filter". As a result it would be like hit and
try.
Regards,
Ankur Padia
On Fri, Jan 25, 2013 at 11:00 AM, Vishal Sinha <vi...@yahoo.com>wrote:
> Hi,
>
> I have created two Datasets using Jena.
> Each Datasets having two or three models.
>
> Lets say triples in Dataset1 are:
> x1 y1 z1.
> x2 y2 z2.
> x3 y3 z3.
> x4 y4 z4.
> x5 y5 z5.
> x6 y6 z6.
>
> Lets say triples in Dataset2 are:
> x11 y11 z11.
> x21 y22 z22.
> x33 y33 z33.
> x44 y44 z44.
> x55 y55 z55.
> x66 y66 z66.
>
> My questions:
> - How can I make combined query on these two data-sets, or lets say
> multiple datasets using Jena ?
> - How can I state that 'y22' in Dataset2 is actually same as 'y5' in
> Dataset1 ? Where should I keep this information?
>
> Thanks,
>
> Vishal