Re: duplicate values for primary keys
Posted by: Rick James
Date: July 01, 2010 11:17PM

Ignore Normalization; build the table the way you need it. If you need two rows with 'BAS' in it, do so. But don't call that a PRIMARY KEY -- a PK is, by definition, UNIQUE. Call it an ordinary INDEX. And be aware of the ramifications when you JOIN to the table.

If you are using MyISAM, you can easily get away without a PK. If InnoDB, it is usually best to explicitly declare a PK, even if it is an artificial INT AUTO_INCREMENT.

Once you have laid out all your tables, then see if you can tweak things to make them more "Normalized".

Normalization is not a 'requirement'. Rather it is a teaching tool to get you thinking in the right direction. Sounds like it yanked your brain too far.

Options: ReplyQuote


Subject
Written By
Posted
Re: duplicate values for primary keys
July 01, 2010 11:17PM


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.