Thursday, January 8, 2009
I Am… Annoyed
So, many years ago, what is now my on-line book database started out life as a simple Excel workbook.
When I had to learn MS Access several years ago, I took that Excel file, and tried to convert it into an Access file. It worked… ok. But at least got me comfortable with the basics of Access.
A year or so later I started working with the woman who was helping me re-write our Access classes, and as an exercise she helped me again convert my Excel file into an Access database, and this time I had a better idea of what I was going, and built queries and life was seemingly good.
Well, when I wanted to learn MySQL, I took that Access database and imported it into MySQL, and that’s how my book database began. I’ve used that database to learn to write queries of various types, and all kinds of PHP/MySQL manipulations. And I’ve gone on to write other databases since then.
Well, I’ve been tying to learn more of MySQL, and been playing with my database and been running into a LOT of trouble. It’s been frustrating, but I’ve mostly been able to get things to work. And as a matter of course the more I learn the more I discover that I should have done things differently, and gone back and changed this in light of this.
Well, yesterday I had a problem I couldn’t figure out, so I had Michael look at it. He was playing with the queries, and then asked to look at the database structure. Since he was driving, I was looking at everything from a different angle, and I suddenly realized the whole damned database had been set up wrong.
That’s right. Instead of having foreign keys liking the databases together, I repeated every bit of data in multiple tables.
(deep breath)
So I’ve dumped the entire thing back into Access, and I’m going to see if I can actually repair the damage.
Wish me luck.