This is an open-source introduction to SQL guide that will help you learn the basics of SQL and start using relational databases for your SysOps, DevOps, and Dev projects. No matter if you are a DevOps/SysOps engineer, developer, or just a Linux enthusiast, you will most likely have to use SQL at some point in your career.
The guide is suitable for anyone working as a developer, system administrator, or a DevOps engineer and wants to learn the basics of SQL.
Bobby Iliev has been working as a Linux DevOps Engineer since 2014 and is an avid Linux lover and supporter of the open-source movement philosophy.
Before we dive deep into SQL, let's quickly deﬁne what a database is. The deﬁnition of databases from Wikipedia is:
A database is an organized collection of data, generally stored and accessed electronically from a computer system.
In other words, a database is a collection of data stored and structured in diﬀerent database tables.
Tables and Columns
You've most likely worked with spreadsheet systems like Excel or Google Sheets. At the very basic, database tables are quite similar to spreadsheets.
Each table has diﬀerent columns which could contain diﬀerent types of data.
For example, if you have a todo list app, you would have a database, and in your database, you would have diﬀerent tables storing diﬀerent information like:
- Users - In the users table, you would have some data for your users like: username, name, and active, for example.
- Tasks - The tasks table would store all of the tasks that you are planning to do. The columns of the tasks table would be for example, task_name, status, due_date and priority.