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.


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.


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


Software engineer & freelancer fromThailand. for work blog :