Re: 1-1 relationships

From: Jan Hidders <hidders_at_REMOVE.THIS.win.tue.nl>
Date: 10 Dec 2000 13:23:29 GMT
Message-ID: <91004h$ig2$1_at_news.tue.nl>


P.Forestall wrote:
> Thoughts:
> 1. Are the two entity types different because they have different key
> attributes? If you implement a combined table, the key needs to be bent to
> fit.

I am not sure I agree. This is only a problem if you think of them as primary keys. For candiate keys it holds that the candidate keys of the joined table is simply the union of the two original sets of candidate keys. No bending or fitting needed.

> 2. Are the two entity types different because they have different
> relationships? Say Entity 1 (E1) and Entity 2 (E2) are 1:1. E1 is also
> related to E3, and E2 is also related to E4. If E1 and E2 are implemented as
> one table, their keys are carried in both E3 and E4. This gives the false
> impression that E1 related to E4, likewise that E2 is related to E3.

With this I completely agree.

> Some programmers will insist you build just one table to keep things
> 'simple'. Later they'll find some unintended use for the bogus
> relationships, sooner or later it's bound to happen. The single, simple
> table won't seem so simple.

When data modelling you shouldn't listen to programmers, you should listen to users. :-)

-- 
  Jan Hidders
Received on Sun Dec 10 2000 - 14:23:29 CET

Original text of this message