I like maps. I wasn’t sure why maps appealed to me until it dawned on me one day that maps are a form of data visualization. The phrase “here be dragons” was used by mapmakers many years ago in reference to uncharted or unexplored areas. I like the phrase. Maps were marked with dragons and in some cases, other animals were drawn to signify danger or unknown, uncharted territories. I find the concept and the phrase kind of cool in a geeky sort of way. You can read more about this old mapmaker’s phrase here.
I also like SQL. I like being able to access a database and spend time with data. I teach a couple of different SQL classes and one thing I’ve found repeatedly has been people’s intimidation by having to write a join in SQL. It’s amazing how far people will go to avoid the dreaded join – it’s a bit like “here be dragons” – a territory marked with fear and uncertainty.
In learning SQL or taking time to practice SQL, you can stall out when you don’t have a safe environment to play in. You can’t just muck about in a production database and sometimes even the test environment isn’t a good place to explore and learn. When I’m teaching SQL, I’ve found working with a fairly small data set is a good way to practice SQL, especially joins. If the data set is small, you can review the data to confirm that the SQL you wrote retrieved the data you wanted.
I decided to build a small database and to share it with the testing community so testers could have a small safe SQL sandbox to play in. Following is an explanation of where to find the files and how to use them to create the database and load the data.
A short disclaimer: I make no promises or claims to update the database files or to be liable for potential flaws or to be liable for what anyone may run off and chose to do with the files. I’m not offering tech support. If you don’t know how to use a create or insert script, you probably should not jump into this terrain – perhaps your database administrator could help. I recommend reviewing the files to understand conceptually what the scripts do before proceeding.
In a future post, I’ll think about posting joins and queries for practice. In many cases, once people have a small database they can work with, they’re happy to go and play. And our work hopefully includes some element of play, creativity and joy. And as testers, exploring unfamiliar terrain holds an immediate appeal.
In choosing what tables and data to build, I decided (which is similar to what I do in my classes) to reference a few authors and books. Both the authors and the books listed in this little test database, not surprisingly, are five SQL books (and authors) whose work I admire. This test data also answers the question: if I had to buy a SQL book, what would you recommend? So even if you don’t want to create a database, you can review the insert data file and find a short list of great SQL books.
Creating the test SQL sandbox:
There are two files: one file creates the database and the second file inserts data into the database. Go to my website; the files and directions are located at the bottom of my publications page.
I am, as always happy to hear feedback.