Friday, July 11

My Initial Impressions Of MySQL

Ah. MySQL. The M in the almost ubiquitous LAMP stack that the Internet seems to be running on nowadays. Apparently the fact that it's free is supposed to be a bonus to how it's a kick-arse database system. I'm sure some of you already know what I think about that - for the rest let me list some of the things I've found with MySQL.

First up, it's how MyISAM tables don't support foreign keys. That, in my eyes, immediately discounts MyISAM as a choice for any kind of RDBMS (that R stands for relational by the way). Luckily MySQL allows tables of different types like the InnoDB tables I'm using which do support foreign keys. The fact that MySQL supports different tables is a good thing even though it exposes the inner workings of the RDBMS to the developer.

As I explained in a previous post, MySQL doesn't seem comfortable dealing with views, something that has already severely bitten me in the bum. It also doesn't support optional or default parameters in procedures, which means the developer has to be a bit clever in how they write procs in order to not end up with a whole bunch of overloaded ones.

But there are some good things too. Procedure calls can now be nested, which is superace. Statements are delimited which is a nice cosmetic feature. It offers AUTO_INCREMENTING columns as a typical primary key, and I've made heavy use of them while raising my DB to 6NF. Joins can be written using the USING keyword to join on similarly named keys. Oh and you can now increment variables inside a select list - useful for counts or groupings.

I do miss MSSQL quite a bit though, especially the Query Analyser. And that's something I never thought I'd admit to! SQLyog is pretty neat, but it does have its annoyances: poor tab support for one, and a total lack of file drag and drop for another. There seems to be a few bugs when scripting the database, although this seems to be a problem with the server rather than the client itself. Intellisense is nice (when it works!).

So a bit of a mixed reaction then? Well yes. To be fair the only thing that's really annoyed me is the pitiful support for views and the fact that I've come across it so early in my work; I can imagine it and other other similar operational issues rearing their ugly heads later on. The rest is just MySQL's way of doing things and something I'll just have to get used to.

No comments:

Post a comment