Re: Do Data Models Need to built on a Mathematical Concept?

From: Marshall Spight <>
Date: Mon, 05 May 2003 00:50:08 GMT
Message-ID: <4zita.734638$L1.209513_at_sccrnsc02>

"Neo" <> wrote in message
> > They occur in SQL. They do not occur in the relational model.
> In the rdb model, each tuple(row) of a relation(table) must be of the
> same degree(number of columns). Thus if we have a column for Social
> Security Number, and the person is an illegal immigrant, we will enter
> NULL (or some arbitrary code). It is the rdb model which requires each
> tuple to have the same degree which does not match reality. In
> reality, things need not have the same number of attributes.

Again, you are describing SQL, and not the relational model.

In the relational model, if you have an optional attribute, there are different things you can do besides using null. In fact, these things are also supported in SQL; you don't even have to fall back on a pure theoretic argument.

You can use a special value. For example, you could enter 0 as the SSN, because 0 is not a legal SSN. This may sound like a trivial distinction, but it isn't. Alternatively, you can have a second table for SSN, and have that table have a column that is both a primary key and a foreign key to the workers table. Thus for each row in the workers table you may have no SSN or you may have one; no other case is possible, and the DBMS can guarantee this for you.

Marshall Received on Mon May 05 2003 - 02:50:08 CEST

Original text of this message