Correspondence between Java data Design and java object

problem description

now the test information of the sample stored in a table of data has the following fields
tableA
id, description, status, type, createDate

then status has pass corresponding code 1; fail corresponding code 2; inprogress object code 3
type also has different categories such as smoke corresponding code; 11 full corresponding code 12.

when I designed tableA, status type stored the corresponding code for the int type

my consideration now is:
now do you need to create corresponding status type tables and associate them with tableA? Then when inserting data on the java server, for status and type, you want to represent the incoming method
by enumerating types, such as TypeEnum {smoke (11), full (12)}
, so you need to define the enumeration class corresponding to status type on the service side. Is it necessary to db to create the status type table? if so, if status changes later, you need to modify both the database table and the enumeration class

.

or db does not need to create the corresponding status type table, just create the corresponding enumeration class in the service section. This can also meet the requirements.

Don"t you know if the Great God has any good suggestions?

Sep.25,2021

make a data dictionary table, id key value, and then write any state to the key, value in the change table. When you associate value, and do a page maintenance data dictionary

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e997c7-4753f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e997c7-4753f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?