;

SQL Introduction


SQL stands for Structured Query Language. SQL is used for storing, modifying and retrieving data in databases. According to ANSI (American National Standards Institute), it is the standard language for relational database management systems.SQL statements are used to perform tasks such as update data on a database or retrieve data from a database.

What is SQL?

  • SQL Stands For Structured Query Language
  • SQL is used for storing, modifying and retrieving data in databases
  • SQL is the standard language for Relational Database System. All the Relational Database Management Systems (RDMS) like MySQL, MS Access, Oracle, Sybase, Informix, Postgres, and SQL Server use SQL as their standard database language.
  • According to ANSI (American National Standards Institute), it is the standard language for relational database management systems.

Why SQL?

SQL is widely popular because it offers the following advantages:-

  • Allow a user to execute queries against a database.
  • Allow a user to retrieve data from a database.
  • Allow a user to insert records in a database.
  • Allow a user to update records in a database.
  • Allow a user to delete records from a database.
  • Allow a user to create new databases.
  • Allow a user to create new tables in a database.
  • Allow a user to create stored procedures in a database.
  • Allow a user to create views in a database.
  • Allow a user to set permissions on tables, procedures, and views.

Brief History of SQL

  • SQL was initially developed at IBM by Donald D. Chamberlin and Raymond F. Boyce after learning about the relational model from Ted Codd in the early 1970s.
  • This version, initially called SEQUEL (Structured English Query Language), was designed to manipulate and retrieve data stored in IBM's original quasi-relational database management system, System R, which a group at IBM San Jose Research Laboratory had developed during the 1970s.
  • SQL became a standard of the American National Standards Institute (ANSI) in 1986, and of the International Organization for Standardization (ISO) in 1987.
  • The acronym SEQUEL was later changed to SQL because "SEQUEL" was a trademark of the UK-based Hawker Siddeley aircraft company.

SQL Commands

These commands can be classified into the following groups based on their Use:

DDL (Data Definition Language): DDL actually consists of the SQL commands that can be used to manipulation of data present in the database.CREATE, DROP, ALTER, TRUNCATE, COMMENT, RENAME are the following SQL commands which are used for Defining of database schema and used to create and modify the structure of database objects in a database.

DML (Data Manipulation Language): DML actually consists of the SQL commands that can be used to define the database schema.SELECT, INSERT, UPDATE, DELETE are the following SQL commands which are used for manipulation of data in a database.

DCL (Data Control Language): DCL actually Consists of SQL Commands which can be used for rights, permissions and Other controls of a database system. GRANT and REVOKE are the following SQL commands.