I’ve never used null before really, I tend to avoid using it and having it existing in my data. However I recently designed this table (simplified):
tblPeopleWhoNeedToCastVotes
User | hasVotedYes
In this scenario, hasVotedYes can either be null, true or false. Null indicates they have not yet cast their vote (useful information).
Is this bad practise or fine?
This is really what NULL is intended for – where the data is not available. From Wikipedia:
I wouldn’t recommend using it as a general “third option”, I’d go with a tinyint and map it to an Enum in code instead. However, for Yes/No and an Unknown, I’d say a NULL is probably the best way, as reading 0/1/2 in the database would be less clear.