The difference meaning between id and code in the database

Supakon_k
Mar 20, 2022
Photo by Brett Sayles from Pexels

Sometimes you might see these two fields (id, code) in the database. both of them is used to identify something, but there is the different point between them .

ID: no meaning in the business world

id usually is used to identify something but we don’t want to remember them. it is used for computing only. for example UUID.

6efb3c2a-c7ff-4ecf-bd63-d90ad58b0140

CODE: have meaning in the business world

code is not only to identify something but it’s also used for humans to remember and abbreviate something shorter. for example currency code.

USD, JPY

here you got two different meanings of them. thank you for reading & enjoy coding :)

--

--