All Forums Database
pgola01 1 post Joined 05/10
13 Nov 2013
Have NULLs in DATE fields always been possible?

Our Teradata instances are used as a DW for our DB2 mainframe application.  In those DW tables, NULL values for date fields are instead represented by '1111-11-11'.  I figure this was either done intentionally as part of the design (either mainframe or DW-side) or it was out of necessity due to NULL not being allowed in a DATE field.
I know Teradata 13 will accept NULL in a DATE field, but I was wondering if that was always the case?  Was it not allowed in past versions?

Raja_KT 1246 posts Joined 07/09
13 Nov 2013

It should allow NULL. All DBs should allow NULL else they dont represent business cases.
I think it is in the mind of the designer to put 1111-11-11 just to be on the safer side.  There may be cases where the designer had really captured all requirements and inferred that this design is best.

Raja K Thaw
My wiki:
Street Children suffer not by their fault. We can help them if we want.

M.Saeed Khurram 544 posts Joined 09/12
14 Nov 2013

All RDBMS should allow nulls to capture all the business scenarios, But it is Application designers decision to either keep the null, or some constant value instead of null to represent some business requirement.


You must sign in to leave a comment.