Table Of Contents
An introduction to SQL.
Last Tended | |
---|---|
Planted | |
Status | Seed |
Definition
SQL stands for Structured Query Language. Its purpose is to allow users to interact with relational databases. Data is structured in tables. Each table has:
- 1 column for each field &
- 1 row for each record.
An SQL statement is composed of:
- an ordered list of clauses (example:
SELECT, FROM, WHERE, …
), - each clause has its own syntax &
- each statement ends in '
;
'.
Example:
/query.sql
The above query will return the class
column values for all rows in the fleet
table.
RDBMS
A Relational Database Management System enables a user to define, create, maintain & control access to the database. The system that will accept your SQL query to & return a result. Some of the most common RDBMSs are:
- Microsoft Azure SQL Database
- MySQL
- PostgreSQL (or Postgres)
- SQLite
Due to its popularity, all examples in this digital garden will be referring to Postgres.
Source