Re: 1:1 relationships

From: Barry <BarryJJ_at_ATTGlobal.Net>
Date: Tue, 23 Jan 2001 20:50:52 -0500
Message-ID: <3a6e36fa_2_at_news1.prserv.net>


Joćo Martiniano wrote:

> Hello, I have a question that is puzzling me, and I hope i'm addressing
> the correct newsgroup.
>
> I recently tried to implement a 1:1 relationship in Microsoft Access...
> but I couldn't.
> I always thought that 1:1 relationships looked like this:
>
> Persons
> --------
> Person ID (primary key)
> Age
> Car ID (foreign key)
>
>
> Cars
> -----
> Car ID (primary key)
> Brand
> Model
> Person ID (foreign key)
>
> My question is: is this the correct way of implementing a 1:1 relationship
> (in Ms Access or any other RDMS) ?

Don't know about Access particularly, but the correct way to implement 1:1 in a Relational model is to put it all in the same table (at least as long as you stick with 3rd Normal Form or less):

  Person



  Person ID (PK)
  Age
  Car Brand
  Car Model

But I suspect what you mean is that it is 1:0..1; that is, you always have a person who, in turn, may or may not have a car. If *that's* what you mean, then the PK of Person finishes up in Car; that is, the "required" end "migrates" to the "optional" end.

Modelling is completely dependent on the definition of the attributes. If my guesses at the definition of your data are wrong, please post more details and we can try again!

HTH ... Barry J. Received on Wed Jan 24 2001 - 02:50:52 CET

Original text of this message