Subject | RE: [Firebird-Architect] Denullify a database |
---|---|
Author | Claudio Valderrama C. |
Post date | 2004-09-20T08:38:57Z |
Milan Babuskov wrote:
default.
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. You only have saved time by not having to retrieve the default from
somewhere to replace the incoming NULL.
only worries about
DEFAULT <v> NOT NULL
cases.
application and screw everything with a simple update?
:-)
C.
>If you want to insert NULL, your column will be nullable and maybe with a
>> 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?
default.
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. You only have saved time by not having to retrieve the default from
somewhere to replace the incoming NULL.
>> If the enforced assignment of default values was to occurDon't see the problem. Again, it seems you didn't get the point the Geoff
>> before any insert or update triggers are fired it becomes
>> possible to write trigger code that can assume valid input
>> values - allowing the code to be much clearer and more
>> succinct.
>
> And make a lot of trouble with backward compatibility of both
> databases and applications.
only worries about
DEFAULT <v> NOT NULL
cases.
>> If I can create my tables/columns such that enforced defaultsSo I can connect to your db with any program that's not your specific
>> are there in the declaration, I have not only reduced the work
>> of writing triggers, I have also declared the intentions of my
>> design in clear and easy to read form (rather than browsing
>> huge amounts of trigger code). And this has got to be a good
>> thing.
>
> Well, I guess it's just your POV. In all my applications I don't have
> a single BEFORE/AFTER UPDATE trigger. I do have many on insert and
> delete operations, but none of them addresses this issue.
application and screw everything with a simple update?
:-)
C.