Re: So what's null then if it's not nothing?

From: paul c <toledobythesea_at_oohay.ac>
Date: Mon, 05 Dec 2005 19:15:13 GMT
Message-ID: <5l0lf.53340$Eq5.17503_at_pd7tw1no>


vc wrote:
> paul c wrote:
>

>>vc wrote:

>
> [...]
>
>>>I am not sure,  as I said before, that  the data type is so terribly
>>>important for storing data.  TTM does not provide any rationale for the
>>>must-be-supported data type.
>>>...

>
> [...]
>
>>For one thing, the only way, without going outside the relational
>>operators (eg. without counting returned 'rows' or checking 'return
>>codes' or 'status codes') to find out if a relation has any true
>>propositions .

>
>
> I am not sure what you mean by the above. Could you please elaborate ?

R{} = TRUE. (In TTM, there is an operator called 'IS_EMPTY' which the book doesn't exactly define, at least when I search through it, but Hugh Darwen was kind enough to confirm when I asked about it that IS_EMPTY(R) is equivalent to R{} being equal to TABLE_DUM, and the opposite would be the case for TABLE_DEE which TTM sees as just a value equivalent to TRUE.)

>
>

>>is to support a value such as 'TRUE'
>>I believe TTM
>>effectively considers TRUE to be equivalent to a projection over zero
>>columns of a non-empty relation.  Basically, it seems to be TTM's way of
>>being able to give an answer within the algebra that supports FOL's
>>existential quantifier, ie. the result of the question is in fact a
>>relation.

>
>
> Could you rephrase that and provide an example ? Also, when is the
> result of a question ( a query ?) not a relation ?

When I don't have a TRUE and FALSE domain for relation values and I ask the question are there any rows in R, I must, for example, use some implementation 'count' function whose result would likely not be a relation or I could 'SELECT' all columns 'FROM' some row of R and then write procedural code that checks some SQL return code and then prints or displays the literal 'TRUE'. By contrast, if I simply 'SELECT *no columns* from R', the result is 'TRUE' and it was the relational operators that gave the answer, not code in some host language.

To some, this may seem quite trivial, but I'm interested in what is intrinsic to the RM and what isn't. Mainly because I imagine a day when some relational engine is wired directly to a display without a lot of mediating code between the user and the db.

(I'll stop now because the more I write about this, the greater danger all the words will confuse me.)

p Received on Mon Dec 05 2005 - 20:15:13 CET

Original text of this message