Re:Farewell Pandas, and thanks for all the fish
by mananaysiempre on Friday August 30, 2024 @06:34AM
(#41399426)
s/Franklin/Codd/
s/represent the above/relax the above/
(Sorry!)
s/represent the above/relax the above/
(Sorry!)
One well-established approach[1] to NULLs is that they represent the above “closed-world assumption” of exhaustiveness to encompass values we don’t know. For example, the same relation could also contain the tuple (Leslie Lamport, 1941-02-07, NULL) to represent that Lamport was born on 7 February 1941 and lives to the present day.
We could then try to have some sort of three-valued logic to propagate this notion of uncertainty: define NULL = x to be (neither true nor false but) NULL (“don’t know”), and then any Boolean operation involving NULL to also yield NULL; that’s more or less what SQL does. As far as I know, it’s possible to make this consistent, but it’ll always be weaker than necessary: a complete solution would instead assign a variable to each unknown value of this sort and recognize that those values are, at the very least, equal to themselves, but dealing with this is NP-complete, as it essentially amounts to implementing Prolog.
[1] http://www.esp.org/foundations/database-theory/holdings/codd...