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.


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