# SQL Keys in Depth

DevFeed: [SQL Keys in Depth](<https://devfeed.tech/articles/sql-keys-in-depth-21479.md>)

Original publisher: [Read original article](<https://begriffs.com/posts/2018-01-01-sql-keys-in-depth.html>)

Published: 2018-01-01T00:00:00Z

Content type: article

Language: en

Sources: [Joe Nelson](<https://devfeed.tech/sources/joe-nelson.md>)

Topics: [Databases](<https://devfeed.tech/topics/databases.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [Structured-data](<https://devfeed.tech/topics/structured-data.md>)

Tags: [articles](<https://devfeed.tech/tags/articles.md>), [databases](<https://devfeed.tech/tags/databases.md>), [relational-databases](<https://devfeed.tech/tags/relational-databases.md>), [sql](<https://devfeed.tech/tags/sql.md>)

## AI overview

An in-depth discussion of keys in relational databases, including the debate over natural and artificial keys, the definition of a key as an irreducibly unique column or column combination, and examples involving card tables and database-enforced constraints.

## Source excerpt

2018-01-01 The internet is full of dogmatic commandments for choosing and using keys in relational databases. At times it verges on a holy war: should you use natural or artificial keys? Auto-incrementing integers, UUIDs? After wading through sixty-four articles, skimming sections in five books, and asking questions on IRC and StackOverflow I think I've put the pieces together and have a recommendation to harmonize the various camps.