Our company decided to designate a contractor by adding an "X" in front of the employee number. But they aren't doing this in all systems.
Is this a dangerous thing to do and why?
Without knowing more about their system I'd say that this is a bad design.
A better choice would be to make a column for contractor that can be 0 or 1. I guess there may have been reasons that prevented them from doing this (for example, legacy systems that cannot be changed).
Whether it is "dangerous" is a bit of a loaded question. It is doubtful people will die if you do this, however, I would definitely recommend against it. Fundamentally as a database designer, one of your overriding goals should be data integrity and that implies that each data value has a single meaning. A common statement that I tell my clients when they suggest doing something like this is "I cannot list every possible bad thing that could possibly happen by doing <insert bad practice here>
, but I can state that there is a very high probability that it will create problems". In this case, that bad practice is trying impart multiple meanings on a single value.
Others have mentioned a few of the problems you might encounter. I know of a couple of others:
A better solution IMO, would be to add a column indicating the role of the person in the company: employee or contractor.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With