Is it a good idea to use null values to distinguish between records? I have a table with two columns. State and Name. State can have two values, 0 and 1.
When the state is 1, there needs to be a value in the column Name. If the state is 0 the Name must be null.

My question is what is considered as a good database design. I've come up with two options.


Remove the column state and just distinguish the state whatever the Name value is null or not.
Have the column State distinguish the state. But then I need to somehow enforce not null values in the case state is 1.
Based on your comment, I would suggest that the addition of the 'State' column adds additional application complexity (constraints necessary to keep the 'State' column in sync with the value in the 'Name' column) for, what appears to be, no added benefit.