Wednesday, November 19, 2008

INTRODUCTION TO SQL

SQL
* SQL is used to make a request to retrieve data from a Database.
* The DBMS processes the SQL request, retrieves the requested data from the Database, and returns it.
* This process of requesting data from a Database and receiving back the results is called a Database Query and hence the name Structured Query Language
* SQL is a language that all commercial RDBMS implementations understand.
* SQL is a non-procedural language
* We would be discussing SQL with respect to oracle syntax
statements:These are the statements present.
* DDL (Data Definition Language)
o Create,Alter,Drop,Truncate
* DML (Data Manipulation Language)
o Insert,Update,Delete,Select
* DCL (Data Control Language)
o Grant,Revoke,Commit,Rollback
Data types are
* Number,Char,Varchar2,Long,date
NULL
* Missing/unknown/inapplicable data represented as a NULL value
* NULL is not a data value. It is just an indicator that the value is unknown
Operators
* Arithmetic operators: +, -, *, /
* Logical operators: AND, OR, NOT
* Relational operators: =, <=, >=, < >, < , >

SQL Data Definition Language
Types Of Constraints available are:
* Column Level
* Table level
Types Of Constraints
* Primary Key Constraint
* Foreign Key Constraint
* Unique Constraint
* Check Constraint
* Not Null Constraint
There is a lot to say about SQL.This is just the introduction about the types of constraints and few more things.
Some content from wikipedia.

No comments: