Databases are everywhere. When I say database, people often think about websites gathering lots of data about something, so they can use the results to optimize or learn something about their users. That’s data analysis, and while you can use databases for that, they can do so much more.
For example, blogs load their posts and comments from a database, user accounts are saved inside a database, online games save game data inside a database, web shops save their products in a database, and so on. Whatever you’re working on, if it’s going to be even a little complex or dynamic, you’ll need a database.
Therefore, we need a way of communicating with databases, a way of telling it to do what we want. Luckily, just like HTML and CSS, there’s a single standardized language we can use: SQL, which stands for Structured Query Language. Basically, it lets us query the database (such as request specific data from it) following a structured syntax. So, it helps the database understand us better, and it helps us not lose our minds in the complexity of the world of databases.
Just like HTML and CSS, however, SQL on its own isn’t enough. A browser is needed to interpret HTML and display it as something meaningful, and in the same way, a database management system is needed to process SQL queries and do something meaningful with it. We call these systems RDBMS: Relational Database Management Systems.
You can view SQL as the native tongue of these RDBMS. Generally, they all speak it in nearly the exact same way. The only difference is that each RDBMS has its own dialect; they add and remove some of the functionality of basic SQL in favour of their own system.
Therefore, whichever RDBMS you choose, there will be some differences with the (advanced) syntax and functionality. Most systems add their own functions, change some keywords here and there, or remove things they think they have a better alternative for.
In this course, I will discuss the standardized SQL language, and if necessary mention some RDBMS specific information for the popular databases. Otherwise, you should be fine, or you should be able to find the differences in the documentation of your particular system.
Table of Contents
- Relational Databases
- Syntax & Queries
- Keys & Constraints
- Data Types
- Operators & Conditions
- Aliases & Variables
- Joins I
- Joins II
- Security & Optimization
- Conclusion: what now?