The difference meaning between id and code in the database

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 :)

--

--

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
Supakon_k

Supakon_k

Software engineer & freelancer fromThailand. for work iam.werter@gmail.com. blog : https://spkcode.com/