SQL
- SQL (pronounced as "ess-que-el") stands for Structured Query Language.
- SQL is an ANSI (American National Standards Institute) standard.
- SQL is used to communicate with a database.
- SQL retrieves and modifies the data in the database.
- It is a very important tool used with relational database management systems like Oracle, Sybase, Microsoft SQL Server, Access, Ingres, etc.
SQL is not case sensitive.
Standard SQL statements can be subdivided into 4 distinct groups which are shown below:
| Group | Statements |
| DQL (Data Query Language) | Select |
| DML (Data Manipulation Language) | Delete, Insert, Update |
| DDL (Data Definition Language) | DROP, TRUNCATE, CREATE, ALTER |
| DCL (Data Control Language) | REVOKE,GRANT |
A look at relational database
Since SQL is used to communicate with the database so lets see what a relational database actually is. A relational database system consists of one or more objects called tables which hold the data. Each table has a unique name. A table is made up of rows and columns.
Lets take a look at this example:
| users | |||
|---|---|---|---|
| first_name | last_name | SSN | age |
| Mike | Peter | 343340909 | 30 |
| Adam | Sandler | 313344119 | 31 |
| Nam | Sam | 243341909 | 34 |
| Neil | Grigorian | 843340900 | 40 |
| John | Russel | 543241507 | 20 |
This is a table named "users" and "first_name", "last_name", "SSN" and "age" are the columns. The rows, "Mike", "Adam" etc. contain the data.
