Re:Mistakes Beginners Make When Working with Databases
by dragonwriter on Wednesday June 08, 2016 @02:01PM
(#11864174)
> Am I the only one who thinks that primary keys should be derived from the actual data?
Where a valid natural key exists, it absolutely should be used. Surrogate keys should only be used where there isn't a natural attribute (or composite of such attributes) that corresponds to the unique identity of a tracked entity.
Where a valid natural key exists, it absolutely should be used. Surrogate keys should only be used where there isn't a natural attribute (or composite of such attributes) that corresponds to the unique identity of a tracked entity.
However, that's very common in the real world.