This smell arises when specific values are defined in an attribute definition to restrict possible values of the attribute.
Specifying all possible values for an attribute in schema definition mixes metadata with data which is not recommended. This smell makes it difficult to extend or modify the list of accepted values for an attribute.
CREATE TABLE Bugs (
-- other columns
status VARCHAR(20) CHECK (status IN ('NEW', 'IN PROGRESS', 'FIXED'))
);
The following set of tools detects this smell: DbDeo(for SQL)
All rights reserved (c) Tushar Sharma 2017-23.