Re: Relation Schemata vs. Relation Variables
- From: "JOG" <jog@xxxxxxxxxxxxx>
- Date: 22 Aug 2006 09:39:38 -0700
David Cressey wrote:
"Brian Selzer" <brian@xxxxxxxxxxxxxxxxxxx> wrote in message
news:H%lGg.16832$o27.8955@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
be
"JOG" <jog@xxxxxxxxxxxxx> wrote in message
news:1156163752.697442.161770@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Brian Selzer wrote:
Identity beyond that provided by a candidate key (that is, a single
database
state) is in the eye of the beholder:
Identity beyond that provided by the identifying keys is a nonsense. By
not encoding it you have told the system it does not exist. If this is
not true who is at fault?
How do you tell the system that it does exist? How can you know when you
design a system whether a key that appears to be very stable will remain
that way? I was called in to fix a problem at a company where management
decided to add a prefix to each part number so that they could tell at a
glance which plant produced a part. So an identifier that was very stable
suddenly wasn't for several days while admin staff were busily updating
every part number in the system, and duplicating parts that were made at
more than one plant. In the end many reports and the application had to
modified in order to summarize the information for parts produced atto
multiple plants and to work around the redundancy introduced as a result.
During that period the database became corrupt because it allowed changes
occur that shouldn't have been allowed. In this case, preventing thosewith
changes was left up to the application, which was not designed to deal
multiple entries for the same part and which remained broken for several
weeks--making the problem even worse. It can be surprising how a change
that doesn't seem that significant can spiral into a total disaster. The
point is, keys that appear to be very stable can change for the stupidest
reasons, and constraints should be definable and enforcible in the
database--including transition constraints. The designers of a system are
making a gross assumption about the stability of those keys if they think
that what is stable today will remain stable tomorrow.
BTDT. This is a classic case, one that has happened enough times so that
it's well documented in the literature.
The consequences should have been eminently predictable, to a seasoned DBA
or database designer. That person should have pushed back to management,
alerting them to the probable disaster awaiting if they changed the keys for
part number.
The specific change wanted by management was, itself, a bad one. It adds
"intelligence" to a key, with the attendant disadvantages.
If a DBA did push back, and management went ahead anyway, then management
screwed up, big time. Unfortunately, managment screwups are often, in
today's world, blamed on somebody else, and managment continues to make the
same mistake.
I agree with David.
However this is not an issue with the logical model. It is not like an
identifying 'hair_colour' attribute changing from brown to red. Rather
it is just a /translation/ of one label to another, even though it
represents /exactly/ the same value it did before. (no different from
translating a database into french say). Its a subtle difference but
the key is still completely stable, and imo should have been altered in
old relation values too so as to maintain consistency given the
managements foolhardy renaming of the world.
.
- Follow-Ups:
- Re: Relation Schemata vs. Relation Variables
- From: David Cressey
- Re: Relation Schemata vs. Relation Variables
- References:
- Relation Schemata vs. Relation Variables
- From: Brian Selzer
- Re: Relation Schemata vs. Relation Variables
- From: Marshall
- Re: Relation Schemata vs. Relation Variables
- From: Brian Selzer
- Re: Relation Schemata vs. Relation Variables
- From: JOG
- Re: Relation Schemata vs. Relation Variables
- From: Brian Selzer
- Re: Relation Schemata vs. Relation Variables
- From: David Cressey
- Relation Schemata vs. Relation Variables
- Prev by Date: Re: Relation Schemata vs. Relation Variables
- Next by Date: Re: Relation Schemata vs. Relation Variables
- Previous by thread: Re: Relation Schemata vs. Relation Variables
- Next by thread: Re: Relation Schemata vs. Relation Variables
- Index(es):
Relevant Pages
|