Thursday, February 22, 2007

MySQL Learning Experience

Originally Posted: 2007-02-07 @ 3:07:06 pm

I never considered myself to be a MySQL buff. In fact I don't think I really am a SQL buff of any sort. when trying to first learn SQL about 4 years ago, I don't think I lasted a week before I gave up considering MySQL to be extremely boring. Trust me ... it is. However the power behind it is amazing. It's like this...

Drinking water is boring. Water tastes boring. Water is boring. But when you get a lot of it, it's really powerful and can't be ignored. SQL is like that. It's rather boring on the surface, but if you can harness the power of it and use it, then it can be an amazing tool, useful and something that can just be the best thing since sliced bread.

A coworker and I were working on a SQL project we started a couple weeks ago. It was amazing the progress a co-worker and I completed with some SQL queries that he came up with that resulted from a 'how do you do this' question. He was working on importing data into SQL from a text file. During that process, we learned what and what not to do for an import of data.

For Example, Did you know that if you perform a 'Load Data' query, SQL will import data. No matter what it is. As a dummy subject, I imported 'notepad.exe' into my SQL database. Yes, it does import, and no it's not pretty. All this gook went into the database and god knows why SQL doesn't check to see if it's correct. I'm under the assumption that it just assumes you know what you are doing. Well apparently it assumes I like importing '.exe' files into databases randomly.

The support file for data imports on the MySQL page is really not too helpful. It mentions seperating data by 'tabs' which in turn doesn't work. We of course put tabs between the data sets. However, Instead of seperating the data into their appropriate fields, MySQL put all the imported data into one field set. I can't tell whether the documentation people are not keeping up with the programmers or the programms just can't tell which ass their heads are in, but I don't think the instructions they gave us worked.

Through bad imported data and learning processes, my time working on MySQL at the hospital has been very educational. I have a good grasp on how MySQL works and how data flows through databases on it. I may not remember the queries by heart offhand, but working on this project definately gave me a good foothold on it. If it hadn't been for me trying to relearn it at the hospital, I don't think I would fully acknowledge it's capabilities.

No comments: