Creating a new table with a unique field

  • We need to know the WHOLE ETL process to help you on this one.

     

    Sample data and required transformation is needed also.

  • Hi, folks. I was reading this thread and spotted this statement which piqued my curiosity:

    >> You should not allow application to run queries on tables or views. <<

    Why not? I don't know. I'm just aking, because I recently had a sql teacher at the local university tell me he rarely uses stored procs because he thinks it's easier to maintain the entire application without having to go to the database, which might be located...well, anywhere, actually...as much as he would otherwise.

    Is it an issue of keeping code separated? With proper architecture, one can do that in the application as well. Or is it a performance issue? Or...

    Just curious.

    Thanks,

    Lee...

  • Yes, there are some concerns...

    SQL Injection Attacks

    Poor performing code due to recompiles because is really 100% dynamic SQL

    Poor performing code because it's written by GUI experts who might not be SQL Server Ninja's.

    Must recomile/redistribute the app code to make even a simple change to the DB.

    "SQL Objects" in app code are typically written as "SELECT *" which usually returns way to much data to the app and requires some pretty good network bandwidth to handle all the unnecessary data.

    The database will almost certainly do things faster with stored procs than remote processing instructions from an app.

    Did I mention "poor performing" code?

    --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)
    Intro to Tally Tables and Functions

  • >> Did I mention "poor performing" code? <<

    Umm...I think you did

    That's kinda what I figured, but was wondering if it was something else as well.

    Thanks for that explanation, Jeff. It was...uh...moden enough.

    Lee...(somebody stop me)

  • Jeff, you did not mention security concerns, when you need to give to all users full access to all tables, sometimes including system tables.

    Than, you cannot limit the data scope for different users groups.

    _____________
    Code for TallyGenerator

  • Yep... I forgot those... the security concerns, that is.  If you are using stored procs, the users don't need huge privs to use the program as they would with embedded SQL.

    Lee, do you know me?  I use the "Mo-den enough" joke all the time at work...

    --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)
    Intro to Tally Tables and Functions

  • >> I use the "Mo-den enough" joke all the time at work... <<

    Really? I wish I could say I did, Jeff, but no, I don't think so. That was just something that seemed rather obvious to me given your name.

    I just do that kinda stuff, too.  

    I just discovered this place and it seems like a good place to hang, so I think the line will come in handy.

    Btw, I just asked somebody on another forum the same question...if he knew me.

    Lee...

Viewing 7 posts - 16 through 21 (of 21 total)

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