It is generally preferable to design the schema to be normalized. This includes not having multiple columns that would store the same information. However, the username and being a management user are definitely distict information and you need both.
You can use the BIT
type for the new column.
In case you want to enforce particular formats of user name, the standard database solution would be to define a check constraint as follows:
ALTER TABLE YourTable ADD CONSTRAINT YourConstraint CHECK ( is_management_user = 0 OR ...)
(where the ...
would include REGEXP_LIKE
on Oracle, cast to an integer in TSQL or something like that).
However, MySql does not enforce check constraints and you have to emulate them using triggers if you consider the form of the USERNAME
somehow important for security or operation of your application - which, I would hope, it really isn't.