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

From: Alexandr Savinov <>
Date: Fri, 10 Jun 2005 12:15:15 +0200
Message-ID: <42a96847$>

Jon Heggland schrieb:
>>It is a variable that may have a type while NULL is a value that can
>>be assigned to any variable of any type including relvars.

> Values also have types. NULL is not a value. It is not equal to itself. 
> Or do you claim that it is?

Value is defined to be a singularity (delta-function where a single element is possible while all the rest from the domain are impossible). In this sense indeed NULL as complete impossibility (all elements are impossible) is not a value. Logically it is a contradiction.

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.

However, in practice the situation is different. In RM we frequently have to do many things that do not make sense. And here I agree that in RM and in SQL NULL should be defined as not equal to itself. Else we will have even more problems then we already have.

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. It is obviously a convenience method - we introduce two separate entities because we are not able to answer question what is their difference in 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?

>>But it would be very interesting to know what fundamental reasons might
>>exist for separating NULL as a variable value and empty set as a
>>collection without elements. For example, do we really need to have
>>different meaning for:
>>1. some_relvar = NULL, and
>>2. some_relvar = {}
>>How do you think? What is the fundamental difference between these two
>>lines of code and do we loose a lot if we retain only the first one
>>(with the meaning of the second)?

> #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?

Received on Fri Jun 10 2005 - 12:15:15 CEST

Original text of this message