SET-BASED AND ROW-BASED

  • Hi,

    I have been asked in SQL competancy test.......

    Please give an example of a set based statement.

    Please give an example of a row based statement.

    I have asked all the other DBA collegues and no one seems to know.

    Any idea?

    Also an explanation or a link to an article explaining what they are would be nice.

     

    Thanks

    Ian

    If Everything Seems To Be Going Well, You Have Obviously Overlooked Something.

  • Is this a trick question???

    SET-based is a SELECT statement for example, while ROW-based is a cursor.

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • Any looping condition where a row is looked at is row-based. A while loop, cursor or any other method where you step thru the rows for processing. 

  • I guess the scary part is that he asked other DBA collegues and they did not know.

    Quand on parle du loup, on en voit la queue

  • PBirch: That was exactly my same thought


    * Noel

  • Guys, I am not a DBA, I write crystal reports and some SQL. But yes something like this seems quiet straight forward now you have told me.

    Thanks Again

    Ian

    If Everything Seems To Be Going Well, You Have Obviously Overlooked Something.

  • Ian,

    You are working with the database and are familar with the structure if you are writing Crystal and some SQL. Knowing how the data is structured could be considered the first step toward being a DBA. Knowing why is the next step.

    And, yes, we are surprised that your collegues were at a loss to explain one of the fundamental parts of SQL.

    If you are planning to move upward in your company - to become one of the DBAs - I would say that your chances are excellent. Do not worry about asking questions - just be able to verify the answers.

    Bon chance

    Quand on parle du loup, on en voit la queue

  • If you are planning to move upward in your company - to become one of the DBAs

    Just out of curiosity: Does this mean, that a DBA is higher ranked than a developer?

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • Yes, higher than my current job spec. I am just a crystal developer with some SQL skills.

    But generally, maybe not.

    If Everything Seems To Be Going Well, You Have Obviously Overlooked Something.

  • That's interesting. Thanks for answering!

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • Laughing. Frank - depends on the company whether the DBA(s) are higher ranked than the developers.

    We usually have the advantage of being the one or the few instead of the many. I have worked in software shops with 30 - 40 developers and only two DBAs. When we wanted something we could always call in favors.

    The disadvantage is that the DBAs were one of the first to be made redundant because the owners decided the developers could manage their own databases. Ah well.

    Quand on parle du loup, on en voit la queue

Viewing 11 posts - 1 through 10 (of 10 total)

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