Get the latest tech news

You'll regret using natural keys


Beating another dead horse.

From a didactic perspective, this makes sense, but the result, so far, is that the young people I work with now propose database designs with natural keys. From following the course curriculum, it'd be natural, however, to define a key for the Restaurants table as the combination of restaurantName, cityName, and year. As an example, for technical-historical reasons, the Danish CPR number carries information (which keys shouldn't do), such as a person's date of birth and sex.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of natural keys

natural keys