SQL: Structured Query Language Includes: Introduction It is a computer programming language that is used for storage, retrieval and manipulation of data that is stored in relational database. This is a standard computer programming language used for RDMS (Relational Database Management Systems). IBM’s Ted Cod a.k.a Father of Relational databases gave the concept of relational model for database in 1970. It was 4 years later SQL appeared in 1974. This was just an idea, which got conceptualized in the form of Systems/R in 1978 and was released by IBM. The ANSI standards and first prototype of relational databases was released in 1986, which is popularly knows as Oracle Advantages: Used for accessing data in RDBMS. Used for describing data. Definition of data and its manipulation. Can be used with other programming language by embedding SQL modules into other languages code, pre-compilers and libraries. Possible to create and drop data base using this programming language. Setting permission on views, table and procedures. Can be used for creating views, procedures and functions. Commands Commands in SQL are categorized into three category namely DDL – Data definition language DML – Data Manipulation language DCL – Data Control language Data Definition Language (DDL) Commands that are classified under DDL category are as follows: CREATE – Used for creating an object, table/view. ALTER – Used for modifying an existing database object. DROP – Object, table an views created using CREATE can be deleted/removed. Data Manipulation Language (DML) Commands that are classified under DML are as follows: SELECT – Used for retrieving a set of records from one/more than one tables. DELETE – Used for deleting records. UPDATE – Used for modifying / updating records. INSERT – Used for inserting records. Data Control Language (DCL) Commands that have been classified under DCL are: GRANT – Users can be granted permission / privileges using this command REVOKE – Privileges to the user can be taken back using this command. Constraints Rules are enforced on the columns of the table that contain data specific for the field for all the record in the table. These rules are referred to as constraints, which are generally used to ensure that field only gets a particular type of value. For instance if there is a field called “Age” in the table, then this field can only take numeric value. Constraints set up for the table apply to all the data stored in the table. Some of the common constraints are: NOT NULL: This constraints ensure that the field value is never set to NULL DEFAULT: Typically used to fill in a default value for any field left blank. UNIQUE: If the constraints is set on a column, then all value set for this field will have to be unique