Re: Too add a new table or not

From: Lennart Jonsson <lennart_at_kommunicera.umea.se>
Date: 6 Nov 2001 04:14:46 -0800
Message-ID: <6dae7e65.0111060408.443f57c8_at_posting.google.com>


"Radu Lascae" <r.nospam.lascae_at_wanadoo.nl> wrote in message news:<d_LF7.17$V27.288_at_castor.casema.net>...
> Your boss is correct:-) There is nothing in relational theory that limits
> the number of fields in a table.
>
> There are however some structures where the _relevance_ of some attributes
> depends on the value of a particular attribute. For example, in a table of
> 'Persons', a person of type='Teacher' may have a relevant attribute called
> 'salary', whereas salary will not be relevant for another one of
> type='Pupil'. For this type of person, 'grade' is relevant.
>
> Some advocate creating different tables to hold the attributes 'salary' and
> 'grade', having a 1-1 relationship with the table Persons. The technique is
> called "subtyping" and is advocated mostly by Access developers. I am
> against it because 1-1 is not normalization, it's just the technical
> inability to use CHECK constraints in a particular RDBMS.
>
> Conclusion: your boss is correct:-)
>

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?

/Lennart Received on Tue Nov 06 2001 - 13:14:46 CET

Original text of this message