Some Different Types of Primary Keys You Can Use for Your Database

Auto-Incrementing Integers

CONs

PROs

UUID (Universally Unique IDentifier)

A UUID is an identifier that is unique across both space and time,
with respect to the space of all UUIDs. Since a UUID is a fixed
size and contains a time field, it is possible for values to
rollover (around A.D. 3400, depending on the specific algorithm
used).

CONs

PROs

Natural Keys

CONs

PROs

Software Engineer: lvl 4; Geek: lvl 5 — LFG

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store