[Helma-user] allowing NULL VALUES in foreign keys
Julian Tree
julian.tree at gmail.com
Tue Aug 22 00:53:47 CEST 2006
On Aug 21, 2006, at 6:21 PM, nex wrote:
> Julian Tree wrote:
>> the CTO at the time eventally replaced all the NULL with zero and the
>> system speed up.
> that is possible, but my guess is that he actually also set the column
> NOT NULL; that way i can see how index-related operations became
> faster.
> but if you leave that bit of information out, it seems
> unbelievable, so
> i also agree with nighthawk :-)
Thanks for the response. After that incident, I started to create all
my database column with NOT NULL from scratch, and that is where
helma is complaining. Whenever if I don't add a child node to a
parent, the foregien key is set to null. This conflict with the NOT
NULL constrain. Maybe there should be a way to insert 0, '' instead
of NULL.
I can understand that alot of applications depends on fields to be
null, but if I am building my system from scratch, why don't I just
start off with a system that doesn't allow null values in any
columns? Disk space is cheap. Now I know there is the theoretical
different between NULL (unknown value) and (blank a known but blank
value). Maybe someone can give me an example, but i don't see any
difference from an application logic point of view and most
importantly from a user point of view to have to have null or blank.
It just seem like one less things to worry about.
More information about the Helma-user
mailing list