|
|
|
|
|
by lifepillar
2017 days ago
|
|
Codd (rightly) recognized two “fatal flaws” [0] in SQL: (1) permitting duplicate rows, and (2) the treatment of missing information (he also criticized the “inadequately defined kind of nesting of a query within a query”, but that addressed 80’s SQL, and I don’t think his criticisms still apply to SQL:2019). Perhaps ironically, SQL NULLs are modelled directly after his (logically flawed) 1975/1979 proposal [1]. It must be noted, however, that he explicitly considered his proposal “as preliminary and in need of further research”. NULLs in databases are best avoided, or restricted to views (not base tables) and managed with great care (I’d say that they should be used only with the “inapplicable value” semantics [2]). [0] Fatal Flaws in SQL, Part One and Two, 1988 [1] Extending the Database Relational Model to Capture More Meaning, 1979 [2] Franconi and Tessaris, On the Logic of SQL NULLs, 2012 |
|