I see some people design design their database having a column STATUS INT where they add values like 0- not active, 1-active, 2-pending . What is the difference between just making an enum(‘not active’,’active’,’pending’). Is it a better database design to not have strings defined for fields and use integers?
Share
If option are limited and fix use enum with direct
('not active','active','pending')Otherwise it will be better to make child table for options and store corresponding integer id(
Primary keyof child table) in parent table.