This course is all about querying and managing databases using the SQL programming language. Because of this, we will spend most of our time studying SQL syntax and logic.
It's impossible to understand SQL without understanding databases, however. Because of this, the first lesson of this course will discuss databases in general.
What Are Databases?
Databases are structured sets of data held in computers. In general, databases allow users to do three things:
- Store data
- Read data
- Modify data
Reading from and writing to a database are both performed using the SQL programming language!
The Relationship Between Spreadsheets and Databases
Many of the students of this course will be familiar with Microsoft Excel or other spreadsheet software. To help you understand how databases work, it can be useful to compare software like Excel to a real SQL database.
In an Excel spreadsheet, you have different tabs where each tab has rows and columns.
In a database, the equivalent term for tabs is
table also has rows and columns!
However, the similarities essentially stop there. Real databases have much more data integrity than Excel spreadsheets and can handle much larger volumes of data.
Databases also allow for relationships between different tables in the database - so a column in a specific table can correspond to the same column in a different table.
Databases can also support live data for websites and applications. For example, there is a massive database that runs behind-the-scenes of the Facebook web application that stores data like your name, your friends list, your messages, and your photos. This database is queried to render the data that you see when you open www.facebook.com.
The Different Database Platforms
There are a number of database platforms available. Each has slightly different characteristics, but they can all be queried using the SQL programming language. A few examples of databases are listed below:
In this course, we will be using the PostgreSQL because it is free, open-source, multi-platform (it works on both Mac and Windows), massively-scalable, and well-documented. The PostgreSQL website also provides a free sample DVD Rentals database that we will be using in this course.
Make no mistake, though - the different database platforms can all be queried with SQL. This means that the knowledge you'll gain in this course will be useful regardless of what type of database you work with in the future.
In this lesson, you received your first introduction to SQL databases! We will work through all of the course installations in the next section before beginning to learn about writing SQL queries.