Practical SQL

Practical SQL

I recently worked on a project where I did a bunch of database work. It had been a while since I had done any database work. I was feeling a little rusty. A while ago I had picked up a copy of Practical SQL. It was staring at me from my bookshelf. It seemed like a good time to pick it up.

Rarely have I read a software book that was as entertaining and interesting while at the same time being very technical. Steve’s book comes to mind. The author is not a computer scientist but a journalist. His expertise with SQL comes from doing research for stories. He talks a lot about how to find the trends and hidden stories in data. He uses a variety of datasets and asks a lot of interesting questions. After each of the sections of the book, I found myself asking my own questions of the data to satisfy my own curiosity. It encourages you to play around and see what you can uncover.

As far as technical details, the book uses Postgresql for the examples. Most of the commands are generic SQL and the author does a great job of pointing out what is standard SQL and what is Postgres specific. There is also a GitHub repository, which contains all the example code, which is nice as it keeps you from having to type everything in. It also makes loading the example data quick and easy.

In addition to basic SQL, the book covers a variety of useful skills. This includes techniques for data scrubbing and cleaning, table layout and design, various advanced query techniques, and using regular expressions and full text search to extract data. It also covers time-related data and geographic data using GIS. It also covers writing your own functions.

Overall the book is fairly comprehensive. It won’t turn you into a database admin or full-blown data scientist, but gives you plenty of tools for creating your own databases and gathering useful information from them. You don’t have to be an expert. It does a good job of starting from zero, without being too boring if you already know a bit. I highly recommend it.

As a LabVIEW programmer, it is worth knowing some SQL. We collect a ton of test data. It would be nice to be able to sort through it and pull out some trends.