Monday, September 28, 2009

SQL (Structured Query Language)

This language is developed by IBM but commercial use started by Oracle. This language has been defined as the standard query language for RDBMS servers. SQL language works on the following two concepts:

· What to do? Is provided by the users, and
· How to do? Is pre-defined within the SQL and it decides the path of execution using its
own logic.
SQL*PLUS:
This is a front-end tool provided by Oracle that interacts with Database Server and allows the users (DBAs, Programmers & Operators) to work with SQL and PL/SQL. From SQL*PLUS we can use following commands:

· SQL Commands
· PL/SQL Blocks
· SQL*PLUS Commands
SQL is basically collection of four sub-languages:

a) Data Description/Definition Language (DDL):
This sub-language deals with data structure that includes CREATE, ALTER and DROP commands.

b) Data Manipulation Language (DML):
This sub-language deals with data within the structure and it includes INSERT, UPDATE and DELETE commands.

c) Data Query Language (DQL):
This sub-language deals with retrieval of data from database and it includes SELECT command.

d) Data Control Language (DCL):
This sub-language deals with security of data and data structures. It includes GRANT and REVOKE commands.
e) Tranaction Control Language (TCL):

This sub-language deals controlling transactions. These commands are COMMIT, ROLLBACK and SAVEPOINT. These commands are known as Transaction Processing Commands.