Overhead. By defining every column a a primary key, you are basically
creating an index of the entire table. So any column that gets
updated, forces the index to update. Hence making the indexes pretty
worthless.

-Adam

On Tue, 9 Nov 2004 09:42:31 -0500, Tangorre, Michael
<[EMAIL PROTECTED]> wrote:
> > From: Gavin Brook [mailto:[EMAIL PROTECTED]
> 
> 
> > Personally I use an individual primary key myself. In the
> > past I have seen oracle databases with two fields as the
> > primary key, but never a whole record. The only justification
> > I can see for having the whole record as the primary key is
> > to save space. Adding an extra column to store a primary key
> > requires the space to store it and the storage for the
> > sequence. On modern servers storage is not usually a problem,
> > particularly with such a small field. On older mainframes, it was.
> 
> I can not speak to AS400 as that was the technology in text books 10
> years prior my college experience (yes I'm a youngin'). Anyway, any
> space you "might" save will be lost when you do updates or selects in
> which you want a specific record assuming there is a comparable stored
> procedure concept on AS400. Consider the extra lines needed to determine
> which record to update or select:
> 
> UPDATE .... SET .... WHERE a=1, b=2, c=3, e=4, f=5 etc etc etc.
> SELECT .... FROM .. WHERE a=1, b=2, c=3, e=4, f=5 etc etc etc.
> 
> Compared to
> 
> UPDATE .... SET .... WHERE a=1
> SELECT .... FROM .. WHERE a=1
> 
> That's not to say that there is never a need for compound keys comprised
> of 2 or 3 columns such as those found in join tables, etc...
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:183728
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to