Michael:

I see three basic problems with this assuming that other tables need to be
linked to this table:
1.  Size - Since the entire table needs to be replicated in each table that
it is linked to, this is highly inefficient
2.  Seek Performance - Searching  and comparing long text fields can become
prohibitive depending on the size of the tables
3.  Update time - if the table is updated frequently, then each of the
linked tables need to be updated as well as do their indices

If this table is not linked to anything or is rarely changed and if disk
space and performance are not issues, then a re-writing is not worth it.
But if the table has too be modified, it is probably worth adding a primary
key and rolling to each linked table as either performance becomes an issue
or other maintenance is performed.

Andy

-----Original Message-----
From: Dawson, Michael [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 09, 2004 8:01 AM
To: CF-Talk
Subject: Primary Key Justification


I'm well aware of the need for a primary key, in addition to a sound
table design, however, I'd like someone else to "word" a response for
me.

A co-worker built a data file (a data table on an AS400) with six
fields.  The only unique "key" of the record is the entire record,
itself.  The combination of all six fields must be used to identify the
exact record.

"This is how it's done," is the reply I get.  (I've been building
web-based apps using relational DBs for 8 years.  I have never used an
entire record as the primary key.)

I'm not passing an entire record through a URL or in hidden form fields.
Imagine the nightmare of maintaining this application...

A discussion of the existence of Oracle's sequences and SQL's identity
fields did little to sway this person's opinion.  This person's entire
development background is AS400 with a history of bad database design.

Now, I'm creating the table myself to do it right.  ;-)

Any thoughts?

Thanks
M!ke



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183734
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to