I want to understand the reasoning behind why two primary keys are not allowed in same table by grammar of MySql. I understand composite key and this is not related to that.
I could not understand why two separate primary key in same table is not allowed. But we can have one column as primary key and other column as unique and not null. Which practically acts as having two different primary keys as we can distinctly identify a row using any of these keys. Why the first one is not allowed but the later is?
I was trying to figure out the logic but stumbled upon Rule 2 of Codd's 12 rules which says
Each and every datum (atomic value) in a relational data base is guaranteed to be logically accessible by resorting to a combination of table name, primary key value and column name.
Does combination of table name, primary key value and column should be unique for a single datum value or can we have multiple combinations which guarantees access? Why or why not?
Edit: Since the question was identified as possible duplicate, I will explain below how it is different Other similar question was
Can I have multiple primary keys in a single table?
The ans is NO.
My question is why? What is the reasoning?
What is that Codd intends to say by rule no 2?
What problems would have occurred if multiple separate primary keys were allowed?