MySQL queries for custom reporting in Dell’s KACE system

Posted January 4th, 2012 in SQL, Toolbox by Jonathan

I’ve probably said it before, but in my current job I get to learn a lot of new things all the time, as a web developer I’ve self-taught myself a lot of my current skill set. One of which is MySQL. I had a pretty basic understanding of SQL and simplistic queries. I’ve never really pushed myself into going further into bigger and nastier queries. Though, I did pick up a good piece of advice at an open source conference I attended. The speaker mentioned that independent of whatever language you are programming in, your database engine (he was speaking of MySQL) will do it better every time. Well the more I dig into it, the more I realize just how correct that statement is. I’ve been living under the impression that I can deal with data better outside of the database engine versus generating a better query to get the right data. I know that makes me sound lazy or dumb – but I think a lot of web developers fall into this when there’s no real reason to push the limits. I mean I could probably catch a lot of you selecting * in your statements huh?

Continue Reading »

Comparing MySQL tables

Posted April 12th, 2011 in SQL, Web Development by Jonathan

At my current job, I’ve become a bit the goto guy on databases. While I don’t consider myself a defacto DBA, I do have to maintain and try to keep from destroying a number of databases. Today, coming on the heels of a serious project a coworker asked if we could compare the structures of tables in two different databases.

I almost responded we’d have to do it by hand – and I was partially right (most likely due to my limited knowledge). But I found a tool that at least gets me half way there so I’m not going through everything by hand (which can lead to problems too).

My normal course of action was to to just use phpmyadmin’s export feature to run the changes on the production tables. It’s not a bad way to go, but I found if I don’t keep up on the tasks, I’d forget about them and then have to go through the entire process with other developers in what they needed changed.

Continue Reading »