Re: Too add a new table or not

From: Bernard Peek <bap_at_shrdlu.com>
Date: Tue, 6 Nov 2001 13:55:38 +0000
Message-ID: <YNBXIBKav+57EwfG_at_shrdlu.com>


In message <6dae7e65.0111060408.443f57c8_at_posting.google.com>, Lennart Jonsson <lennart_at_kommunicera.umea.se> writes

>
>What if Student have lets say 15, and Teacher have 5 attributes. Given
>that 2 or 3 of the attributes are common for both types, should one
>model that with a single table, or use 1 parent table and 2 subtype
>tables?

Database design isn't only driven by the structure of the data. You might need to think about how the data is going to be used. How big are the tables? If you create a new table then you will probably need to write some new programs too. Can you justify the extra time to do that? In a large system the extra storage space for unused fields may make it worth optimising the system by creating extra tables.

-- 
Bernard Peek
bap_at_shrdlu.com

In search of cognoscenti
Received on Tue Nov 06 2001 - 14:55:38 CET

Original text of this message