| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: NULLs: theoretical problems?
David Cressey wrote:
> "Bob Badour" <bbadour_at_pei.sympatico.ca> wrote in message
> news:46c6ddd4$0$4031$9a566e8b_at_news.aliant.net...
>
>>David Cressey wrote:
>>Tautologies (and contradictions) arise often when evaluating queries >>against views.
create view C(x int, y int)
as select blah as x, yech as y
from A
where blah = 1
union
select clam as x, mussel as y
from B
where clam = 2
;
select *
from C
where x = 2 -- causes both a tautology and a contradiction
;
>>>In situations where I've observed other programmers having trouble with >>>3-valued logic, it nearly always boils down to using possibly omitted >>>values in a WHERE clause. >> >>Don't you mean subordinate clauses in the WHERE clause? Like "or x is >>null" ?
Oh, I see what you were saying now. Instead, I would object: Since one cannot predict every ad hoc query, every attribute is potentially useful in a where clause, which necessarily means when the table allows NULL possibly omitted values will eventually appear in a where clause.
> Perhaps you know a query language where propositions (or maybe predicates)
> are expressed as such rather than cast into the expressions of operations on
> tables. If so, I'd venture to guess that the clumsiness of the attempt to
> retrieve two different kinds of facts in a single operation would stand out
> starkly in such a language.
It should require two relations and probably a union in the case you hypothesize.
>>I respectfully suggest it is pointless to argue that NULL is easy to use >>after Date and Darwen have written several books worth of material >>explaining all of the subtle gotchas. See the various _Writings...._
The one that I usually start with is SUM(A) + SUM(B) != SUM(A+B) in the presence of NULL, but D&D have basically written entire books on the subject. Received on Sat Aug 18 2007 - 11:37:52 CDT
![]() |
![]() |