Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Does Codd's view of a relational database differ from that ofDate & Darwin? [M.Gittens]

Re: Does Codd's view of a relational database differ from that ofDate & Darwin? [M.Gittens]

From: Jon Heggland <heggland_at_idi.ntnu.no>
Date: Mon, 13 Jun 2005 10:37:07 +0200
Message-ID: <MPG.1d17641cdb054838989694@news.ntnu.no>


In article <42a96847$1_at_news.fhg.de>, savinov_at_host.com says...
> I am not sure that it makes sense to compare on equality NULL "values"
> just because it does not make sense to ask if two absent things are
> equal or not. Consider the following question: "There exist two points 1
> and 2 which actually do not exist. Are they equal or not?" Obviously, it
> is non-sense because we say that something that is claimed to exist
> really does not exist (is NULL). The conclusion is that we cannot
> compare on equality what does not really exist (is NULL). When it
> appears then we will compare them.

Precisely! Yet it makes perfect sense to compare two sets on equality, even if one of them is empty. Thus, NULL != empty set, which is all I am arguing here.

> However, in practice the situation is different. In RM we frequently
> have to do many things that do not make sense.

In SQL, we do. In RM as such, I contest that statement.

> If we distinguish two types of variables:
> - single-valued, and
> - set-valued
> the the solution is to reserve NULL for single-valued variables and
> empty set {} for set-valued variables. Then NULL and empty set can be
> treated as one and the same thing but having different type.

No. The empty set is a perfectly respectable set. NULL is not an integer (or float, or string, or image, or ...). NULL does not have a type. It is not the same thing.

> different situations. More interesting question is if it is possible to
> solve the problem by having only one thing for both types of variables.
> Do you think it is possible and necessary?

An empty collection (be it a set, an array, a list or a relation (or a string, for that matter)) is not the same as the absence of the collection. I don't think they should be treated the same.

> >>1. some_relvar = NULL, and
> >>2. some_relvar = {}
> >
> > #2 has a clearly defined meaning. What does #1 mean?
>
> Here are the options for #1:
> - is empty set (equivalent to #2)
> - is not assigned/initialized (one possible interpretation is UNKNOWN)
> - any possible set (UNKNOW)
> - is not needed and should not be used
>
> What would you prefer?

The last one.

-- 
Jon
Received on Mon Jun 13 2005 - 03:37:07 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US