What is SQL ?
What is SQL ?
As we interact with several databases in our daily routine , we are probably using SQL, even if we don’t know it. For example when we fill a form and submit on a database driven program, it runs a SQL query in back end to give the desired output on next web page. When we hit search button on a website , it interacts with database using SQL. So now the question arises that What is SQL ?
SQL stands for Structured Query Language. Structured Query Language is the set of instructions used to communicate with relational database. SQL language is used to create, transform and retrieve information from RDBMS (Relational Database Management Systems). SQL was developed in 1974 at IBM San Jose Laboratory.
According to ANSI (American National Standards Institute), it is the standard language for relational database management systems. In 1987, ANSI and ISO published an initial standard for SQL.
SQL statements are used to perform tasks such as insert data on database, update data on a database, delete data from database or retrieve data from a database.SQL uses set of commands to manipulate the data in relational databases. For example SQL INSERT is used to insert data in database tables. SQL SELECT command is used to retrieve data from one or more database tables. SQL UPDATE is used to modify existing database records.
Some common relational database management systems that use SQL are: MS SQL Server, Microsoft Access, Oracle, MySQL, DB2, Sybase, PostgreSQL and Informix.
SQL has three major components :
- Data Manipulation Language (DML)
- Data Definition Language (DDL)
- Data Control Language (DCL)
1. Data Manipulation Language :
Data Manipulation Language (DML) is collection of SQL commands used to manipulate data in database in some form.This manipulation involves inserting data into database tables, retrieving existing data, deleting data from existing tables and modifying existing data. DML is mostly incorporated in SQL databases. Some of the important DML commands are as below :
- SELECT
- INSERT
- UPDATE
- DELETE
2. Data Definition Language :
Data Definition Language (DDL) is set of commands used to create and destroy database and database objects. DDL commands are primarily used by database administrators during the setup and removal phases of a database project. Some of the important DDL commands are as below :
- CREATE
- USE
- ALTER
- DROP
3. Data Control Language :
Data Control Language (DCL) is set of SQL commands used by database administrator to configure security access to relational databases. DCL contains only three commands which are as below :
- GRANT
- REVOKE
- DENY
So, now we know that how data is created, updated, deleted and manipulated in many other ways in database.
Soon I will write more about SQL commands. Do write your suggestions below.
Thanks for reading.