Python's Duck Typing Not General Enough; SQL's Minimally Typed Foreign Keys Not General Enough. Debugging Hilarity Ensues.

The money quote was this "It’s not a big leap then for me to consolidate all three of those into one uber relationship table...".

The question was a good one because it involved the classic higher-order database relationship.

The canonical SQL relationships are binary equi-join relationships that can be …

more ...





Tabular Results

The "correct" answer is to fully normalize the design and get away from a mixed bag of columns and nulls. The MESS is bad from every perspective, except query performance. A semi-normalized design that separates the STATE CHANGES from the ESSENTIAL DEFINITION is an optimal design in many respects.

Here …

more ...