Subject | Re: RES: [firebird-support] String Concatenation with null field |
---|---|
Author | Helen Borrie |
Post date | 2006-01-09T23:20:44Z |
At 06:22 PM 9/01/2006 -0300, you wrote:
concatenate and enforce an empty string as the DEFAULT.
<sermon>
Basically, if you have one business rule that requires a column to be
non-nullable - e.g. your concatentation requirement - then another business
rule that violates that rule - e.g. the column definition allowing nulls -
is a design fault. The fact that, since Fb 1.5, you could work around such
design faults by using COALESCE() does not mean you have cured the original
design fault.
Potentially any design fault is going to cost you extra keystrokes in DSQL,
in perpetuity, to work around it, as well as the constant risk that some
time, some developer is going to forget that the fault exists. Is it worth it?
</sermon>
./heLen
>OK Martijn Tonies,The other alternative is to define as NOT NULL any fields that you want to
>
>But this is the unique form? My scripts will increase a lot in size with
>this.
concatenate and enforce an empty string as the DEFAULT.
<sermon>
Basically, if you have one business rule that requires a column to be
non-nullable - e.g. your concatentation requirement - then another business
rule that violates that rule - e.g. the column definition allowing nulls -
is a design fault. The fact that, since Fb 1.5, you could work around such
design faults by using COALESCE() does not mean you have cured the original
design fault.
Potentially any design fault is going to cost you extra keystrokes in DSQL,
in perpetuity, to work around it, as well as the constant risk that some
time, some developer is going to forget that the fault exists. Is it worth it?
</sermon>
./heLen