# SQL Tutorial

**What is Database(DB)?**
Any collection of related information 
For Example: Phone Book, Shopping list, ToDo List, 

Databases can be stored in different ways such as On paper, On your computer etc.

What is Database Management Systems(DBMS)?
A special software program that helps users create and maintain database.
 
- Makes it easy to manage large amounts of information
- Handles security
- Backups
- Importing/Exporting data
- Interacts with software applications.

In Database we have four operations that is Create, Read, Update and Delete. 

![crud.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1652335285870/_mG6yg2tU.png align="left")

## Two types of Databases:
**Relational Databases(SQL) : **
Organize data into one or more tables and each table has columns and rows, a unique key identifies each row.
Helps users create and maintain a relational database.
mySQL, Oracle, postgreSQL, etc

**Structured Query Language(SQL)**
Used to perform CRUD operations as well as other tasks like user management,backup etc.
Used to define tables and sturctures.

![sql.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1652336888501/pjCz-L-lJ.png align="left")

**Non-relational Databases(NoSQL): **Organize data is anything but a traditional table i.e., Documents(JSON/XML), Graphs, Flexible Tables.
Helps users to create and maintain non-relational database i.e., mongoDB, firebase etc.

![nosql.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1652336876517/4aLkLhS-u.png align="left")

**Database Queries:**
Queries are requests made to the database management system for specific information.
A google search is a Query.

The following functionalities can be performed on a database using SQL:
1. Create or Delete a Database.
2. Alter a Database
3. Select data from tables.
4. Insert data into tables.
5. Update data in tables.
6. Delete data from tables 
and much more.....

SQL Datatypes:

![dt.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1652346499185/OtvKHR9mN.png align="left")

SQL Commands:
SQL Commands are instructions that are used by the user to communicate with the
database, to perform specific tasks, functions and queries of data.













