Well, this is my first post in this blog. This blog is suppose to be about day to day stuff that happens to me that isn’t video game related, on account of having my video game related stuff in my Blogspot blog (leeram.blogspot.com). Confused?
Since university I have had a complete hatred of databases. But then, a year or so ago, I came across PHP and used it to start re-designing my Eckychap web site (which still is no-where near finished). I quickly realised that PHP would enable me to automate my web site, assuming I used a database and stored my data in it.
So off I went and designed a database for Eckychap. I had no idea of what to do, and you can tell! It’s taken me a while to get to grips with PHP, but I’m relatively ok with it now, so my next challenge is to set up a proper database.
I know that databases should have relations and that data should be unique but I don’t know what a relation is or how to make one. I assumed that if you made 3 tables all have a column with the same name and then somehow "relate" them together, then changing the data in one table will mean that data changes in all the others automatically. It turns out that this isn’t the case and that is the reason why I struggled so hard to understand the damned things.
It turns out that a database is no more than a load of tables and nothing else. If you normalize your data so that multiple tables include the same column names (to relate them) then you have to individually know which tables contain what data and change it all manually. The database doesn’t do it for you.
For instance let’s say TABLE1 contains CAR_ID and CAR_OWNER, TABLE2 contains CAR_ID and CAR_MANUFACTURER and TABLE3 contains CAR_ID and AVAILABLE_COLOURS. Then I would have expected that if I change a value in TABLE1’s CAR_ID (maybe from Countach to Enzo) that the database would automatically change the same value in the other two tables.
But noooooo, does it shite. I personally have to remember every single table in the database that has a CAR_ID and then change them myself. OK there are probably little routines you can run to automatically find every table with CAR_ID in it, but, I mean, come on… it’s ridiculous.
So how, I wonder, does something like MS Access actually update everything for you if databases don’t? Access is supposed to be a database, so why does it do what mySQL can’t? Well, from what I can tell, it turns out that MS Access is not just a database. It is a database and a management system – a DBMS if you will. Maybe I am wrong with the terminology but if I understand it right it means that MS Access will remember what you’ve got in what table and update it all automatically for you. Unfortunately Access is so difficult to understand that I just gave up with it, and it’s no good for Internet access (in my opinion).
So I maintain that databases are crap. Useful – yes. Essential – yes. A god send when it comes to automating web sites – yes. But crap all the same.
The end of my first post… and it turned out to be a whinge. Sorry!