What's the Edge Case?

  • Comments posted to this topic are about the item What's the Edge Case?

  • 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

  • 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


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply