Re: Examples for one-to-one associations?
Date: Tue, 8 Jun 2010 02:25:58 -0700 (PDT)
Message-ID: <ab5a3dcf-aea5-4532-a8a4-b2d0f37dffed_at_42g2000prb.googlegroups.com>
On Jun 8, 1:04 am, Gene Wirchenko <ge..._at_ocis.net> wrote:
> 1-1 is rather strict. On the course example, I had plenty of
> courses where the instructor taught the one course to one class in TWO
> rooms: one for theory and one for labs. I also had a few where the
> course was in different rooms at different times including one case
> where for one day of the week, the first hour was in one room and the
> next hour was in another building.
Agreed.
>
> >A one-to-one relationship exists equally between both. Why do you
> >want to allocate ownership of the relationship to either entity?
>
> I missed this at first myself. Presumably, there is a PK for
> both tables. Use that to access the two tables.
I disagree with your assumption of two tables, although I suspect such an assumption lead to the original question of "who references who". On the level of modelling the system or domain, we don't need tables at all. As for the implementation, I don't see any reason to choose a two table design yet. In fact, without further information, I would choose to represent the relationship in 6NF, i.e. give it its own table. Received on Tue Jun 08 2010 - 11:25:58 CEST