July 20th, 2024

Sentinel-free schemas: a thought experiment

The article explores eliminating NULLs and sentinel values in database design for clarity and accuracy. It suggests using separate tables per attribute and explicitly defining missing data reasons. This approach enhances data integrity and readability.

Read original articleLink Icon
Sentinel-free schemas: a thought experiment

The article discusses the concept of sentinel-free schemas in database design, aiming to eliminate the use of NULLs and sentinel values. It highlights the challenges associated with NULLs in relational databases, such as compatibility issues and ambiguous semantics. The author suggests structuring databases without NULLs or sentinel values to enhance clarity and avoid incorrect results. The article proposes using separate tables for each attribute to ensure data integrity and avoid the need for sentinel values. It also emphasizes the importance of explicitly defining missing data reasons for critical information. By encoding missing data explicitly, businesses can handle different scenarios effectively without ambiguity. The article compares the sentinel-free approach with NULLs, noting improvements in theoretical correctness and human-readable semantics. It concludes by hinting at future topics related to database design, such as historized attributes and handling absence of data confirmation. The article provides a thought-provoking perspective on database schema design, advocating for clarity and precision in data representation.

Link Icon 1 comments
By @threatofrain - 3 months
If we're supposed to go sentinel free does that mean no more numerical types? If we can explicitly define what null means in either code or documentation, we can do the same thing to sentinel values.

None of the things proposed in this thought experiment are fresh ideas to an old problem.