Subject Re: [Firebird-Architect] Denullify a database
Author Milan Babuskov
Claudio Valderrama C. wrote:
>>>Having a default that can apply to null columns, whether the
>>>NULL was specified on the insert or the result of the column
>>>not being specified, allows inserts to be more efficient.
>>
>>What if I really want to insert NULL in column that has a default
>>value?
>
> If you want to insert NULL, your column will be nullable and maybe with a
> default.

Ok.

> If your column is NOT NULL and has a default (the case Geoff was exposing),
> then you don't have a way to insert NULL and therefore, no harm has been
> done.

Ok.

> You only have saved time by not having to retrieve the default from
> somewhere to replace the incoming NULL.

Hm, still doesn't answer the question: What if I have a nullable column
with default, and want to insert NULL? Or is that not going to be
addressed by this at all?

> Don't see the problem. Again, it seems you didn't get the point the Geoff
> only worries about
> DEFAULT <v> NOT NULL
> cases.

I guess I did miss the point then.

> So I can connect to your db with any program that's not your specific
> application and screw everything with a simple update?
> :-)

You can't. I don't give passwords to people how may screw up everything
;) LOL. Well, joke aside, I don't have a NOT NULL columns with DEFAULT
values in any of my apps, and if you do try to insert null, you get the
error and you know that you need to provide "default" value by the
application.

All this is just my POV, and I do admit I misunderstood that this has
got something to do with a nullable columns. Thanx for clearing that up.

Regards,

--
Milan Babuskov
http://fbexport.sourceforge.net
http://www.flamerobin.org