Skip to content

Latest commit

 

History

History
9 lines (8 loc) · 438 Bytes

1004.md

File metadata and controls

9 lines (8 loc) · 438 Bytes

Generic Primary Key

Skip using a generic primary key (id):

Adding an id column to every table causes several effects that make its use seem arbitrary. You might end up creating a redundant key or allow duplicate rows if you add this column in a compound key. The name id is so generic that it holds no meaning. This is especially important when you join two tables and they have the same primary key column name.