Re: I have read tons of theory...but still...one question
Date: Sat, 16 Oct 2004 21:29:45 -0700
Message-ID: <e6s3n09j137oakmnbhsbo4nqk5l4ksc9ep_at_4ax.com>
"Kostas" <noemail_at_noemail.net> wrote:
>"Lemming" <thiswillbounce_at_bumblbee.demon.co.uk> wrote in message
>news:8ft0n0p93s2q4o6vu05l19thp2qve9pcnm_at_4ax.com...
>> On Fri, 15 Oct 2004 00:52:18 -0400, "Kostas" <noemail_at_noemail.net>
>> wrote:
>>
>>>Many thanks to anyone who can clue me in,
>>
>> This is not an answer, but a question.
>>
>> Somewhere in this thread someone said to use the phone number as the
>> primary key. Or maybe it was a differnet thread, and that's why I
>> can't find it :) Anyway ...
>>
>> What happens in such a scheme if two people have the same phone
>> number?
>
>Here is the answer (please note I am a novice only compared to the folks
>that frequent this group so it would be better if someone else validated my
>answer).
>
>The phone number is unique. If our database had only phones we are fine as
>we are.
Ah, no. What if the phone is moved to a different phone number? (For example, I move and change my phone number. Since I own my phone, I take it with me.)
>If, on the other hand (and most expected case), we also hold information
>about people that have phone numbers then we will also have a second entity
>PERSON.
>As such, PHONE becomes a weak entity because the existence of a particular
>phone implies the existence of a particular person that owns it.
Nope. A phone can exist without an owner in your system.
>In logical design this would mean that the primary key for PHONE is now the
>combination of PersonID and PhoneNumber fields, which is always unique, so
>we are fine because the PersonID would be different for the 2 people with
>the same phone number.
No, the PK for phone would be unchanged. To talk about a phone (or phone number), we need not bother with who has it.
>> What happens if one person has two or more phone numbers?
>
>Again, no problem. Different PhoneNumber this time. The combination
>PersonID, PhoneNumber still remains unique.
This is another table. *This* is a weak entity between person and phone (or phone number).
[snip]
Sincerely,
Gene Wirchenko
Computerese Irregular Verb Conjugation:
I have preferences. You have biases. He/She has prejudices.Received on Sun Oct 17 2004 - 06:29:45 CEST