|
Thank you for answering.
But the truth is that if we dont create a separate table in this case, our database wouldn't follow the normalization rules.
In this particular case, if we use a boolean field, then we wont be able to break it ('cause we have only 3 possible values). But not all db systems have a boolean type. So, if we would use a tinyint or char or other 1-byte length type, there may be a situation when,
using just a field 'sex' (not a foreign key), we put into this field another value, different from ( '0', '1', null ) for the integer type or
('m', 'f', 'u' / null ) for char types.
You may say that "your application have to control this and not allow to do such things", but suppose you dont have any application (just sql tools) or the application have bugs and allow to insert any values into this field.
|