cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Kienenberger" <mkien...@gmail.com>
Subject Re: Relationships across databases
Date Wed, 20 Jun 2007 21:12:58 GMT
If I recall, it means that for a given query select ID from table1 t1,
table2 t2 where t1.id = t2.id, you will have to do something like
this:

List list = select T1_ID from table1;
for each item in list
{
     select * from Table2 where t2.id = item.t1_id
}

The multiplication is number of the queries issued, not the memory used.

Obviously, the simple case above could be optimized using an IN
statement, but anything that wasn't trivial could not be.


On 6/20/07, Øyvind Harboe <oyvind.harboe@zylin.com> wrote:
> In the link below it says that relationships does not work across
> databases "as it will require Cayenne to do in memory cartesian
> product processing".
>
> What does this qualifier mean? Does it mean that it is possible to
> enable this, but it would take a lot of memory? That this feature was
> considered, but rejected as it would have not worked in all cases?
>
> For the cases that we need this, there is no problem for Cayenne to
> have both tables completely in memory (always < 1000 records) so I'm
> not concerned about CPU processing power or memory consumption.
>
> Has any work been done on supporting this?
>
>
>
> We've got a real database (Derby) that has relationships to other
> existing datbases(MS Access/FoxPro databases). We can't move the
> existing databases into Derby due to bug-by-bug compatibility
> problems.
>
> http://cwiki.apache.org/CAY/multiple-databases-example.html
>
> --
> Øyvind Harboe
> http://www.zylin.com - eCos ARM & FPGA  developer kit
>

Mime
View raw message