Re: 1:1 relationships

From: (wrong string) ćo Martiniano <martiniano_at_hotmail.com>
Date: Thu, 25 Jan 2001 00:47:40 -0000
Message-ID: <980383613.51101_at_tubarao.ip.pt>


Hi.
Thanks for the replys.

I guess that it does make sense putting all the attributes in one table, though... on the other hand it doesn't feel right. I read in an older post (12/12/2000, by Jan Lenders), this:

(i hope it is not bad netiquette pasting fragments of other people's posts; if it is, my apologies)

"> > 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. :-)
I agree; if there is a reason why two entities appear in the conceptual model in a 1-to-1 relationship the end user must have considered them as being different things.
As a data modeler it is your job to know *why* this is true."

Well, i would like to hear more opinions, because i'm not a DB specialist, and i'm not very sure of anything.

Thanks in advance
Joćo

"Barry" <BarryJJ_at_ATTGlobal.Net> wrote in message news: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 Thu Jan 25 2001 - 01:47:40 CET

Original text of this message