A database is an organized collection of data.
Types of Databases
In general, there are two common types of databases:
- Non-Relational
- Relational
Non-Relational Database
In a non-relational database, data is stored in key-value pairs. For example:

Here, customers' data are stored in key-value pairs.
Commonly used non-relational database management systems (Non-RDBMS) are MongoDB, Amazon DynamoDB, Redis, etc.
Relational Database
In a relational database, data is stored in tabular format. For example,

Here, customers is a table inside the database.
The first row is the attributes of the table. Each row after that contains the data of a customer.
In a relational database, two or more tables may be related to each other. Hence the term "Relational". For example,

Here, orders and customers are related through customer_id
.
Commonly used relational database management systems (RDBMS) are MySQL, PostgreSQL, MSSQL, Oracle etc.
Note: To access data from these relational databases, SQL (Structured Query Language) is used.
Introduction to SQL
Structured Query Language (SQL) is a standard query language that is used to work with relational databases.
We use SQL to
- create databases
- create tables in a database
- read data from a table
- insert data in a table
- update data in a table
- delete data from a table
- delete database tables
- delete databases
- and many more database operations
SQL Example: Read Data From a Table
Let's take a look at an example,
SELECT first_name, last_name FROM Customers;
Here, this SQL command selects the first name and last name of all customers from the customers table.

SQL is used in all relational databases such as MySQL, Oracle, MSSQL, PostgreSQL etc.
Note: The major SQL commands are similar in all relational databases. However, in some cases, SQL commands may differ.
In this SQL tutorial series, we will learn about SQL in detail. We will cover any SQL command differences among MySQL, Oracle, SQL Server, Postgres, and other commonly used database systems.