|
Posted by Steve Jorgensen on 10/19/05 06:11
On Tue, 18 Oct 2005 22:06:57 +0000 (UTC), Erland Sommarskog
<esquel@sommarskog.se> wrote:
> (wackyphill@yahoo.com) writes:
>> If you have several entities that have many common properties but a few
>> have a few unique fields to them how do you design your tables?
>>
>> DO you make a seperate table for each entity even though they have many
>> common fields or is there a way to do an OO type thing where you have a
>> common table for all and somehow tack on the unique fields?
>>
>> Just unsure whats possible and what's best.
>
>Basically as Steve says.
>
>One has to be a little careful, and not overdo it. If it's only one or
>two extra columns, maybe it's better to keep them in the main table.
>Or let several "subclasses" share a table.
I concure with that. My example, in fact, is a case where having 3 tables
instead of optional fields is usually overkill.
[Back to original message]
|