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

Home -> Community -> Usenet -> c.d.o.misc -> Re: nulls in databasae design

Re: nulls in databasae design

From: Tom Kearney <tkearne1_at_erols.com>
Date: 1998/01/09
Message-ID: <34B66EFA.5472@erols.com>#1/1

Neil:

I usually like to use NULLs, since they are logically more sensible (to me, anyway). In addition to the other comments, a couple of gotcha's about NULLs.

If people are going to create a lot of ad hoc queries against your tables, the NULLs are inevetablely going to cost time, because NULLs always fail comparison tests for your joins, but it is so easy to forget which columns allow NULLs and which don't. Therefore, it is quite easy to write flawed SQL queries using these fields, and it is not easy to spot these flaws, especially when you're in a time crunch.

A different problem: in another case, we HAD to use NULLs for many fields that should have been NOT NULL. A high level manager decided to use FoxPro to create some applications against our Oracle tables (don't ask why!), using ODBC. But, ODBC (or at least the version they used) limited the number of characters allowed per SQL statement. So when new records were created, all the values couldn't be supplied in one statement. So they had to CREATE a row with some values and then UPDATE it with the others. Many columns had to be NULL for this operation to work. (Other work arounds could have been proposed, but dropping the NOT NULLs was considered the most expedient).

Regards,
Tom Received on Fri Jan 09 1998 - 00:00:00 CST

Original text of this message

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