Re: Modeling Address using Relational Theory

From: Marshall Spight <marshall.spight_at_gmail.com>
Date: 30 Aug 2005 19:56:12 -0700
Message-ID: <1125456972.947536.116890_at_g43g2000cwa.googlegroups.com>


dawn wrote:
> Gene Wirchenko wrote:
>
> And if you want to place an address line between what is current line
> one and line two, then in the application code, you move addressLine2
> to addressLine3 and put the new line in addressLine2, right? You are
> modeling an ordered collection of addressLines that requires operators
> of insert, "ripple" delete (I'm sure there is a real name for it, but
> I've been doing some digital video editing and I like that term), etc.

I really don't think it is a list. How often do you delete line2 and expect line2 to be replaced with the city? How often do you expect to delete FirstName and have LastName become the new FirstName, and LastName be empty? You don't ripple delete on address compononents, or on first name/last name, or on the different components of a date, even when they all have the same type.

> If it looks like a list and it sounds like a list, it obviously still
> doesn't need to be implemented as a list -- it can be implemented as
> individual attributes and you can hand code those inserts & deletes.
> But that doesn't mean that it is not, logically, a list of values you
> are modeling.

I don't think it sounds like a list. I don't think it's logically a list, in part because there are no list operations on the data. For example, you don't concatenate two addr1 values and get an addr1 and an addr2.

Have you ever seen an application where you could insert a new line of text between addr1 and addr2 and have addr2 moved to addr3? I haven't, and I've gotten my fair share of feature requests for address editing.

Marshall Received on Wed Aug 31 2005 - 04:56:12 CEST

Original text of this message