Performance wise, single-table inheritance is the winner, while
multiple table inheritance (vertical usually with one common table
and a specific table per class) is the most flexible solution IMO, so
both have their uses.
Cayenne currently supports the first scenario, and will support the
second in 3.0 (haven't tried current composite vertical inheritance
workaround myself, so I can't comment on it).
Andrus
On Nov 29, 2006, at 5:14 PM, Tomi N/A wrote:
> 2006/11/28, Malcolm Edgar <malcolm.edga..mail.com>:
>> My 2 bits worth..
>>
>> I find the single table model works better than modeling class
>> inheritance through multiple tables. The reason being you have less
>> referential integrity constraints to worry about when using a single
>> table
>
> Still, if you have e.g. people, devices, rooms and buildings and you
> want to schedule their use, you might construct a GenericResource
> table with a couple of it's own attributes and consider everything
> else a specialization of the GenericResource.
> What I mean to say is that obviously there are cases where separate
> tables are the only sensible conclusion. I'm keen to know: does
> cayenne handle that scenario?
>
> Cheers,
> t.n.a.
>
This archive was generated by hypermail 2.0.0 : Fri Dec 01 2006 - 06:14:01 EST