Poorly chosen name



  • A friend who works in operational-support observed a development group do this...

    A new DB table needed to be created, so they requested that it be given a certain name. That name had already been used. They chose another name. That name had also already been used. After three more tries, they got PO'd, as it was late, they just told the DBA to name the table 'asshole'. Two days later, the app was deployed, and log entries started showing up on the operator console; every time someone added a new row:

    inserting ... into asshole

    The support folks were not amused; go figure.

     



  • If an obvious name like 'inventory' isn't available, is it really that hard to settle for 'myappname_inventory' instead?

     



  • [quote user="merreborn"]

    If an obvious name like 'inventory' isn't available, is it really that hard to settle for 'myappname_inventory' instead?

    [/quote]

    In fact, I would argue that if multiple applications share one database, all tables should be named with the application_tablename pattern.  At the very least they sort nicely that way.



  • I agree with both of you. Interstingly, some of the DBA's I've worked with don't like that approach because it makes the table names "too long".



  • My choice as a DBA, since the 'asshole' seemed directed at the DBA would have been:

    developers_asshole

     

    "Inserting ... into developers_asshole"  much more accurate and descriptive table, IMO.



  • So the actual SQL commands would have been along the lines of

    INSERT INTO asshole (foodtype)
    SELECT cucumber
    FROM supermarket_shelf
    WHERE size="satisfying"

     

    OK... I really need to grow up. 



  • That made me laugh out loud. I'll have to remember this and try it one of these days.



  • [quote user="rmr"]

    In fact, I would argue that if multiple applications share one database, all tables should be named with the application_tablename pattern.  At the very least they sort nicely that way.

    [/quote]

     Surely even if the apps have to share a database, they don't have to share the same schema?
     



  • [quote user="please"]

    just told the DBA to name the table 'asshole'.

    [/quote]

    Are you sure they didn't tell the DBA to "name the table, asshole"?

    I would have. Any DBA who can't resolve this problem himself is an asshole.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.