Bad Designs are Painful

As I come around to do maintenance on some of my older projects some terrible designs come back to haunt me.

Take for example:

Event Registration

  • registration id
  • first person id
  • second person id
  • third person id
  • fourth person id
  • some details

Event Person

  • person id
  • some details

The person entry doesn’t know what registration it is applied to, and the code to call it has to do several joins to get all the people.

And while yes, now I know it’s a better design to do the following:

Event Registration

  • registration id
  • some details

Event Person

  • person id
  • registration id
  • some details

Me of 10 years ago did not, and it causes me much groaning as I attempt to re-design the database and then find all the code that needs to be updated to recognise it.

Leave a Reply