In couple of projects, the integer column is defined and the associated string value is handled in code.
example, status column defined as integer and values saved in DB is 1, 2, 3, 4, 5, 6 and 1-6 values mapped in code as 1-read, 2-write, 3-delete (String values)
In couple of projects, the enum column is defined and the associate enum value is handled in code.
One project uses Spring JdbcTemplate and native SQL queries. Other uses Spring, Hibernate and Hibernate queries
Of the above 2, which one is the best, efficient and non-error prone approach.
Please let me know in detail.