test

Saturday, August 29, 2009

Overview of SQL

SQL (Structured Query Language), pronounced as SEQUEL' is the language used by most relational database management systems to query or access data. The language was developed by IBM in the 1979. Oracle corporation introduced the first commercially available implementation. SQL has become the de-facto industry standard language for relational databases. The American National Standards Institute (ANSI) adopted SQL as the standard language for RDBMSs in 1986.
The International Standards Organisation (ISO) has also adopted SQL as the standard language for the RDBMSs.
All major RDBMSs support some form of SQL and most RDBMS vendors intend to comply with the ANSI standard.
Features of SQL:
SQL is a non-procedural language, in other words you specify what information you require, not how to get it.
It allows you to specify the types of things you want to see in terms of results you want.
It processes sets of records rather than a single record at a time.
It provides automatic navigation to data.
It provides variety of commands for carrying out different tasks. Using these SQL statements can be formed to access the data.
Allows access to the database, execute queries against database, retrieve data, delete records, update records etc.,
Works with different databases like MS Access, DB2, Informix, MS SQL Server, Oracle, Sybase etc.,
Types of SQL statements:

SQL provides different statements for carrying out different queries/activities against the database and these can categorized as follows:
DDL (Data Definition Language): Used to create, modify & delete database structures but not data.

Example commands: Create, Drop, Truncate, Alter
NOTE: Every DDL command implicitly issues a COMMIT command to the database. (If you are a new user, you need to refer oracle documentation for details on COMMIT)
DML (Data Manipulation Language): Allows changing of data within the database.
Example commands: Insert, Delete, Update
TCL (Transaction Control Language): Controls activities inside user's session, saving changes discarding changes, making logical breakpoints within transactions.

Example commands: Commit, Rollback, Savepoint
DCL (Data Control Language): Controls access to the data.
Example commands: Grant, Revoke.
DQL (Data Query Language): Allows getting data & impose ordering upon it.
Example command: Select
Embedded SQL: It allows to embed languages like C, C++ etc.,. SQL is a powerful language but there are queries that cannot be expressed in SQL, for example displaying data in the User Interface, printing a report etc., and hence embedded SQL was needed.

0 comments:

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More