I\'m curious to know how NULLs are stored into a database ?
It surely depends on the database server but I would like to have an general idea about it.
On PostgreSQL, it uses an optional bitmap with one bit per column (0 is null, 1 is not null). If the bitmap is not present, all columns are not null.
This is completely separate from the storage of the data itself, but is on the same page as the row (so both the row and the bitmap are read together).
References: