I'd like to get people's opinions on best practise.
Is it better practise to use foreign key to definition table or use constants in code?
The scenario is, There is a table called 'car' The 'car' has a column called 'size' There are only 2 possible values for 'size'. 'BIG' and 'SMALL' It is very unlikely that there will be new values of size. e.g. 'MEDIUM' will not be required. Hence no administration of size is required.
The two ways to go forward are: 1) make a table called 'car_types' and have BIG and SMALL as two rows. Then have a foreign key to the 'car' table.
2) have a const CAR_SIZE_BIG = 'BIG' const CAR_SIZE_SMALL = 'SMALL' in a class. Then, the 'size' column in the 'car' table is of type VARCHAR(10). And it stores either 'BIG' or 'SMALL'
I understand that option 2 is not Normalised. However which is the perferred or better method?
Thanks. Opened for your feedback.