Best way to deal with true, false and 'unset' state

I would like to know which is the best way to handle the scenario when you would like to represent something as a boolean BUT it can be unset, so you end up having null.

Is a better way of handling this or just using null as ‘unset’ state in a boolean column is the accepted?


Do you have a concrete example? I find that in most cases, either the “unset” state could really be defaulted to one of true/false or I’ve made a mistake in trying to model the problem using booleans. What a better alternative might be is highly situation-dependent. Some examples are: an enum, a string, an association, multiple booleans.