Re: Common Lisp, SQL, NIL and null



On 30 Aug 2006 02:15:14 -0700, tfb@xxxxxxxxxxxxxxxxxxxxxxxxx (Thomas
F. Bur***) wrote:

Nulls *are* bad in a *relational* database system. Instead of sets,
you have swiss cheese. If you have an attribute which does not always
have a 1:1 correspondence with the rest of the attributes in a
relation, put it in its own relation. SQL's null is just an ugly,
aweful hack to allow users to get by with non-normal databases.

Non normalized databases are a necessary evil.

Decomposition to BCNF is impractical with a realistic data set. A
database in BCNF makes non-trivial queries ridiculously complex and
processing time scales exponentially with the size of the intermediate
joins.

You are correct that nulls are an efficiency hack ... but so is
selection (and for non-normalized data, projection as well). The
alternative to using them is to waste a lot of time waiting for
answers.


(In an object model, you want something like an unbound slot, but then we're
talking about object systems, not the relational model.)

SQL doesn't implement the relational model - it was simply inspired by
it. SQL implements a *** hybrid of relational set algebra, tuple
calculus, and procedural logic. If you want a pure relational set
manipulation language look somewhere else.

George
--
for email reply remove "/" from address
.