Attention: We are retiring the ASP.NET Community Blogs. Learn more >

Your Daily Cup of WTF - tblState

Naturally, all tables referencing tblState link with a column “intStateID”

Now, I don't know about you, I think you'd be a fool to implement this any other way. Think about it, what happens if a state descides to change it's name and abbreviation ... and the database you moved to when this happens does support update triggers? Can you really afford to take that risk? I didn't think so!

4 Comments

  • I know just what you mean. However when you have people who don't know what they're doing forcing design decisions, sometimes you don't have a choice.

  • Don't take this personally Alex, but consultants see so much of this (often on a daily basis) that it isn't really newsworthy :)



    Also, beware that the person you are rediculing today might turn out to be your future boss ;) Stranger things have happened

  • I was doing some SQL Server training for some people that had taken over a database designed by a consultant that had just left. While I was showing the database diagram tool, one of them said that their tool at work didn't have the lines between the tables or the little yellow thing like mine did.



    and upon further review, their 300 table application had neither primary nor foreign keys defined. I later got an e-mail saying that indexes where never created either.



    opppps.

  • I had to support an application with a state table that had GUID's for primary keys. This will be useful when we approach 3.40282367 × 10^38 states, or when multiple entities are creating states simultaneously and need to merge their lists. Until that time, it makes for difficult maintenance.

Comments have been disabled for this content.