SQL stands for Structured Query Language. It is the standardized programming language used to manage data stored in relational databases.
So, what is a database? It is any collection of related information. There are 2 main types of databases:
- Relational Databases (SQL) –
- Organizes data in tables, made up of columns and rows (stores structured data)
- A unique key identifies each row
- Relationships between tables are formed through primary and foreign keys
- Organizes data in tables, made up of columns and rows (stores structured data)
- Non-Relational Databases (no SQL/ not just SQL) –
- Organizes data into anything other than a traditional table (stores un-structured data)
- Key-value stores
- Documents (JSON, XML, etc)
- Graphs
- Flexible tables
- Organizes data into anything other than a traditional table (stores un-structured data)
Then, there are Database Management Systems (DBMS), which are special software applications that help users create and maintain a database. Some examples of Relational Database Management Systems (RDBMS) are : MySQL, Oracle, postgreSQL, Microsoft SQL Server, etc. Even though they all use SQL, there are subtle differences between the syntax for each RDBMS, so the code is not always portable from one application to another without modification.
The 4 core operations (aka C.R.U.D.) the DBMS can perform are: Create, Read, Update, Delete.
SQL can be considered a hybrid language of the following 5 sublanguages:
- Data Query Language (DQL) –
- Used to query the database for information
- Get information that is already stored there
- (select)
- Data Definition Language (DDL) –
- Used for defining databases schemas
- (create, drop, alter, truncate)
- Data Control Language (DCL) –
- Used for controlling access to the data in the database
- User and permissions management
- (grant, revoke)
- Data Manipulation Language (DML) –
- Used for inserting, updating, and deleting data from the database
- (insert, update, delete)
- Transaction Control Language (TCL) –
- Used for dealing with the transaction within the database
- (commit, savepoint, rollback)
What is a query? It is a set of instructions (written in SQL) that tell the RDBMS what information you want it to retrieve for you. As the database’s structure becomes more complex, it’s more difficult to get specific pieces of information. The goal is to get just the data that you need.
These are mainly notes to help me as I learn. I will continue to add additional information over time :).

