Re: A Normalization Question

From: Neo <neo55592_at_hotmail.com>
Date: 12 Jul 2004 10:48:08 -0700
Message-ID: <4b45d3ad.0407120948.65c02f9b_at_posting.google.com>


> create table house_color (
> customer_id numeric(5) not null,
> exterior_color varchar(10) not null,
> interior_color varchar(10) not null,
> trim_color varchar(10) not null,
> primary key (customer_id)
> )
>
> Suppose the manufacturer of the paint used for the
> exterior renamed all their paint colors, and "brown"
> is now called "St. Tropez Tan." If you simply change
> the one instance of "brown" in your schema you have,
> as you call it, "corrupted" your database, since you
> have also changed the data where it doesn't apply.
> That's an update anomaly.

No, the above is an example of carrying out the wrong steps to achieve the desired goal. In your example above, you are not demonstrating that the string 'brown' is not redundant. You are demonstrating an incorrect method of renaming somethings that are named by the same string initially.

Suppose we have:
X isa person.
Y isa color.
Z isa street.
'brown' isa string.
Let X, Y, Z be named by the same string 'brown'.

If we desire to only rename person X to 'browne', the process is to see if 'browne' already exists, if not, create 'browne', then unrelate X from 'brown' and re-relate to 'browne'. (XDb1 does this when user edits the person named 'brown')

If we desire to only rename color Y to 'tan', the process is to see if 'tan' already exists, if not, create 'tan', then unrelate Y from 'brown' and re-relate to 'tan'. (XDb1 does this when user edits the color named 'brown')

If we desire to correct 'brown', then we change the string 'brown' to 'nworb' and this has the affect of renaming X, Y, Z (XDb1 does this when user edits the string 'brown')

If you only wanted to rename somethings from 'brown' to 'tan', then you shouldn't simply change string 'brown' to 'tan'.

You may want to read an older thread named 'Common Ancestor Report' as this exact issue was discussed and demonstrated with XDb1. Received on Mon Jul 12 2004 - 19:48:08 CEST

Original text of this message