From: Bruno T. <bt...@as...> - 2003-08-06 00:32:18
|
Hi There > > > At 14:18 2003-07-24 -0400, Brad Bollenbach wrote: > >> > Well, if there's going to be composite keys, that might as well be > >> > generalized to all the columns (i.e., any attribute could be a > >> composite > >> > of several columns). > >> > >> What's the use case for this? So I think a have a situation where some could need this: (note, this is existent database, system under development has to integrate to it, so bad database layout is not a way out here. Badly designed databases are out there and we must work with some of them) :( products_table +---+-----------------------+ |id | description | family_id | subfamily_id | +---+----------------+-----------+--------------+ | 1| Foobar gum | 10 | 5| | 1| Foobar lolipops| 10 | 6| | 1| Foobar socks | 20 | 5| family_table +---+-----------------------+ |id | description | +---+-----------------------+ | 10| Candies | | 20| Underwear | subfamily_table +---+-----------+---------------+ |id | family_id | description | +---+-----------+---------------+ | 5| 10| chewing gum | | 5| 20| socks | | 6| 10| lolipops | I need to retrieve subfamily description for my products. It is possible to manually retrieve it, but the idea is just state to SQLObject that id and family_id are primary keys for the subfamily table and that the subfamily are linked to the products through those keys. Having SQLObject retrieving the subfamily object when I retrieve a product using those definitions would be great. []'s Bruno Trevisan bt...@as... |=3D| Async Open Source |=3D| D. Alexandrina, 253= 4 http://www.async.com.br/ |=3D| +55 16 261-2331 |=3D| 13566-290 |=3D| +55 16 9781-8717 |=3D| S=E3o Carlos, SP, B= rasil |