• CELKO (11/27/2012)


    I would also spend more time on the DDL than most people do. Good DDL with lots of constraints, DRI actions, etc. can do 80-90% of the hard work. And have at least one exercise in Normalization.

    Unfortunately, Adventureworks sucks as a schema. Its purpose was to show off as many T-SQL features as possible without much regard to Normalization, ISO standards, or basic data modeling.

    Hear HERE! I strongly second those recommendations! A bit on formatting, readability, and consistancy would go a long way as well. I just got done trying to read some code written by a 3rd party and the inconsistancies in case, indentation, and style (all written by the same person) were just awful. Teach them to take pride in their code. Seeing the word "SET" spelled as "set", "Set", "SET", and "SeT" within 4 adjacenct lines of code just doesn't make sense to me especially with all of the tools available nowadays.

    --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)