Re: Too add a new table or not

From: Richard Price <mmarques_at_optonline.net>
Date: Mon, 12 Nov 2001 11:13:21 GMT
Message-ID: <l9OH7.64907$%94.9258030_at_news02.optonline.net>


Haven't we forgotten considering how the data is to be used? For instance, if a requirement is to track what teachers had which students in what classes when; the keys to that "fact" table would probably be teacher_id, student_id, and class_id, and date_id. If this is the case, shouldn't student_id be the key to it's own seperate table and with it's own attributes? Or would you advocate creating views of the one large table, one view for student, the other for teacher?

"Bernard Peek" <bap_at_shrdlu.com> wrote in message news: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 Mon Nov 12 2001 - 12:13:21 CET

Original text of this message