Breaking down T-SQL requirements (methodology)

  • Hello All,

    I have a bit of experience with T-SQL and have done a lot of things with it over the years. The one thing that I feel is most of need for me that I am missing is how to approach complex program requirements when designing queries, sprocs, functions etc...

    Programmers use mock code to outline the steps to their programs but is there a systematic, step-by-step methodology that you use when designing and working out a SQL problem or can you provide reference to resources?

    Thanks!

    A clever person solves a problem. A wise person avoids it. ~ Einstein
    select cast (0x5365616E204465596F756E67 as varchar(128))

  • For your better understanding of what I am thinking it would be something like what this article covers but more in-depth - such that a book could be written about.

    A clever person solves a problem. A wise person avoids it. ~ Einstein
    select cast (0x5365616E204465596F756E67 as varchar(128))

  • To be honest, I use "old fashioned" methods such as building either a written flow-chart or, if it's not that complex a problem, a mental flowchart, and then I "peel just on potato" at a time. It's much easier for me to tackle just one block of code at a time than trying to hold the whole thing up in the air while I build a foundation under it.

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

  • That is pretty much the approach I have been seeing everywhere. So I guess it is the way it is done. I just thought maybe someone would have documented a more decision tree like structured flow to the process. Thanks for your reply.

    A clever person solves a problem. A wise person avoids it. ~ Einstein
    select cast (0x5365616E204465596F756E67 as varchar(128))

  • TeraByteMe (8/9/2014)


    That is pretty much the approach I have been seeing everywhere. So I guess it is the way it is done. I just thought maybe someone would have documented a more decision tree like structured flow to the process. Thanks for your reply.

    To ber honest, I've not seen it done that way by many. I've found that a lot of folks just sit down and start hacking with no plan.

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

  • What I meant to say was everybody worth listening to :). When a person has to go back into their code after being away from it for a while it makes it much easier when there is a predictable/logical structure to it. I know that helps me.

    To ber honest, I've not seen it done that way by many. I've found that a lot of folks just sit down and start hacking with no plan.

    A clever person solves a problem. A wise person avoids it. ~ Einstein
    select cast (0x5365616E204465596F756E67 as varchar(128))

  • Ah. Gotcha.

    I also enforce a set of fairly strict but very easy to comply with set of standards both at work and upon myself.

    --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 7 posts - 1 through 6 (of 6 total)

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