Explanation of validity status encoding

When writing your own database mapping, you essentially need to know that valid is 1 and invalid is 2.