A Quick and Dirty Introduction to Structured Query Language (SQL)
A simple overview regarding SQL
In a couple of our previous articles, we discussed how to set up a mySQL database pool and how to use the singleton design pattern in order to improve the database pool. In this article, we wanted to take this one step further by discussing how to actually use structured query language to obtain data from a database.
What is Structured Query Language
Before we can understand how to use SQL, we must first understand what SQL is. First developed by what is now Oracle in the 1970s, Structured Query Language (SQL) is a programming language for storing and processing information in a relational database. A relational database stores information in tabular form, with rows and columns representing different data attributes and the various relationships between the data values. You can think of a relational database as a more techy version of Microsoft Excel.
Understanding the concept of a relational database is important to understanding how to use SQL, and the best way to understand this to look at an example. Take for instance the following database diagram from one of our future articles on building a test bank in python. As a bit of terminology, each block present in the picture corresponds to a table in the database (think tab…