November 14, 2022 at 12:00 am
Comments posted to this topic are about the item What's the Edge Case?
November 15, 2022 at 3:53 pm
When designing the initial model for a database, I'd rather err on the side of tight constraints (ie: default to not-null if the business can't think of a good reason it would ever be NULL). If the business later says: "Hey, we get an error when we try to enter a PO for a tax exempt customer!", then it's no big deal for the DBA to deploy a single line of code to alter the constraint. Frankly, that's just spilled milk.
However, if you default to null, and the business says: "Ooops! We entered several dozen PO last month without adding sales tax.", then that's potentially a big mess to straighten out for everybody.
"Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho
April 15, 2025 at 7:52 pm
My favorite "Edge Case" is in the conversion of a DATETIME2 with a given resolution to a DATETIME2 of lower resolution or even DATETIME. When is it "OK" for the conversion to round up to the next day never mind the next week, month, quarter, or even year?
IMHO, the answer is NEVER.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply