UPDATE: A quick edit to further explain my answer about Normalization as people seem to be passionate this isn't accurate. At the root of things, this approach is creating a separate table with a one-to-one relationship and overloading the meaning of NULL
to mean whatever our most common value is, which would be 0
in our example scenario. When I say overloading the meaning of NULL
, we are implying that the absence of a record means said record has a default value. Again, this design approach isn't different than any other one-to-one or one-to-many relationship between two tables, but in this case we're just implying that the absence of a record means something. Again, this isn't a revolutionary design approach, it's just a way to overload functionality which at the end of the day is just another flavor of normalizing the data.
responding to comments that normalization is an inaccurate term for this approach
John Eisbrener
- 9.5k
- 6
- 30
- 63