MySQL oddities in legacy project

December 22nd, 2007 by mgkimsal Leave a reply »

I recently inherited a project.  My primary goal is to make it portable to the extent that it can run on another webserver setup.  This is a PHP4/LAMP system, but the people I’m getting it from didn’t write it themselves, and can’t spend the time to dig in to it and make it able to run on other systems.  Sort of a long story, but the crux of it is is that I’m having to do some cleanup.  I’m going to make this run under PHP5.2, but I’m looking at some things in the database dump, and they scare me.

One table has three columns which slightly freaked me out.  One column’s name is “DROP DATE”.  I KNOW you can get around using ‘reserved’ words by escaping the  column names, but the fact that this was written by someone who named a column ‘drop date’, using a space *and* two reserved words in a column name doesn’t inspire me with much confidence.  Another column’s name is “fall/spring/winter” – the slashes freak me out there, and the last one is “# users”.  Again with the space, and a pound sign as the first character – I don’t think I’ve seen so many weirdly named columns in one project.  I’m not even through reviewing the entire db schema yet, but these are enough to make me really cautious about the rest of the project already, and I’m barely in to it.

A table named ‘delete’ – just found that one too.  Sheesh…

Share and Enjoy:
  • del.icio.us
  • DZone
  • Facebook
  • Reddit
  • StumbleUpon
  • Digg
  • Simpy
  • Technorati
Advertisement

2 comments

  1. MPS says:

    Run away!!! Run away!!!

  2. jimw says:

    sounds like someone who used an application like microsoft access to create their tables. more free-form column names are typical there.

Leave a Reply