Re: Modeling Address using Relational Theory

From: Gene Wirchenko <genew_at_ucantrade.com.NOTHERE>
Date: Tue, 30 Aug 2005 13:44:41 -0700
Message-ID: <ahf9h198hb904td624p64biuhp60pg3nk3_at_4ax.com>


On 30 Aug 2005 12:01:24 -0700, "dawn" <dawnwolthuis_at_gmail.com> wrote:

>Marshall Spight wrote:
>> Gene Wirchenko wrote:
>> > On 29 Aug 2005 20:49:44 -0700, "dawn" <dawnwolthuis_at_gmail.com> wrote:
>> > >
>> > >I understand the Line1, Line2, Line3 implementation, but any model with
>> > >those attributes screams "this model is not relational", right? I am
>> >
>> > No. It is not 1NF if the attributes can have other than one
>> > value, but the names are irrelevant except that they be unique within
>> > the relation.
>>
>> Agreed. Line1 and Line2 are not two interchangable instances of
>> the same kind of thing; they are specific distinct fields. It
>> is not a repeating group.
>
>I realize it is not a repeating group, but I thought that having
>Major1, Major2, Major3 or AddressLine1, AddressLine2, AddressLine3
>violated relational modeling principles. Are you saying that this is
>just fine? If I understand correctly, it is fine because line1 is the

     No, it is not fine that you thought incorrectly about the RM.

     Yes, it is fine to have such entities.

>first line, where line2 is the second line, so they are different
>attributes? So, if you want to have a person's name and up to 4 of

     They are.

>their former names, does it violate relational principles to have these
>as attributres Name, FormerName1, FormerName2, FormerName3,
>FormerName4? The most recent former name is decidedly a different type
>than the one before that. If relational theory supports lists made in

     How?

>this fashion, I find that really fascinating, don't you?

     They are not lists. They are separate entities. The result of an Olympics event could be represented by

          (EventID, Place1ID, Place2ID, Place3ID)

     Ship To and Bill To addresses are similar. In some industries, it is well-established that only the two are required. Were multiple addresses (and no specific number of them) required, then it would have to be normalised into another table.

Sincerely,

Gene Wirchenko Received on Tue Aug 30 2005 - 22:44:41 CEST

Original text of this message