MySQL Forums
Forum List  »  Newbie

Re: Primary Index
Posted by: Peter Brawley
Date: July 03, 2010 11:59AM

Jeremy,

>a good rule of thumb is that most well designed databases
>include a filed in which all values will be unique, so
>auto increment doesn't have to be use?

Actually a non-temporary table isn't a real table if it doesn't have a primary key, and as for using real-world values as PKs, there is another consideration. The real world changes, and makes errors. Companies change identifying codes. People forge ID numbers, or misreport them. But primary keys should never require edits. Therefore the preferable rule is: use auto_increment whenever there is no real-world key that you can prove will ever require editing.

PB
http://www.artfulsoftware.com

Options: ReplyQuote


Subject
Written By
Posted
July 03, 2010 09:15AM
July 03, 2010 09:42AM
July 03, 2010 10:28AM
Re: Primary Index
July 03, 2010 11:59AM
July 04, 2010 10:49AM
July 04, 2010 10:53AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.