Set Age As Primary Key

Set Age As Primary Key
database-memes, primary-key-memes, bad-design-memes, database-design-memes, sql-memes | ProgrammerHumor.io

Someone decided to use age as a primary key in their database. You know, that field that changes every single year and is shared by millions of people. The error message "User with this age already exists" is the database's polite way of saying "congratulations, you've just discovered that multiple 17-year-olds can exist simultaneously on planet Earth."

Primary keys are supposed to be unique and immutable. Age is neither. It's like using "human" as a username and wondering why registration keeps failing. This person will indeed go far—straight into a legacy codebase that everyone else refuses to touch.

More Like This