One Stop Solution for Computer Programming & Programming Languages techniques in Java, C, C plus plus, C#, asp.net, windows applications, visual studio and sql server database as well as all pc tips and tricks with computer softwares.

Tutorial On Structured Query Language(SQL)


SQL(Structured Query Language)

SQL is a specialized purpose language used  for managing data in database or relation database management systems(rdbms). It is a multi - paradigm language and firstly appeared In market In 1974. It was designed & developed by Donald D. Chamberlin & Raymond F. Boyce.
                                    It was originally based on Relational Algebra & Tuple Relational Calculus. And was used for first time E.F. Codd's Relational Model.
                                          SQL became a standard of the American National Standards Institute (ANSI) in 1986, and of  the International Organization for Standards (ISO) in 1987. Since then, the standard has been enhanced several times with added features. But code is not completely portable among different database systems, which can lead to vendor lock-in.

SQL is mainly divided Into four parts:
  1. Data Query Language(DQL)
  2. Data Definition Language(DDL)
  3. Data Manipulation Language(DML)
  4. Data Control Language(DCL)
1. Data Query Language(DQL) : This part of SQL is used to
                                                          extract records from database 
    used its Select command.
  1. SELECT Command
2. Data Definition Language(DDL) :- This part of SQL is used to
                                                               create or delete databases, 
    for applications using its several commands like CreateAlter & 
    Drop commands.
  1. CREATE Command
  2. ALTER Command
  3. DROP Command
3. Data Manipulation Language(DDL) :- This part of SQL is 
                                                                      responsible for handling records of tables & databases. It inserts, updates or deletes commands using InsertUpdate & Delete commands of SQL.
  1. INSERT Command
  2. UPDATE Command
  3. DELETE Command
4. Data Control Language(DDL) :- This is most important part of 
                                                            SQL is totally responsible for administration part of database like giving permission to access database or revoking permissions using its Grant & Revoke.
  • GRANT Command
  • REVOKE Command
 SQL Language Is Divided Into Language Elements : -
  1. CLAUSES : - Components of queries and statements.
  2. EXPRESSIONS : - It can produce scalar values.
  3. PREDICATES : - It is used to specify conditions.
  4. QUERIES : - It used to retrieve data.
  5. STATEMENTS : - Persistent effect on schemata and data.
Transaction Controls :- It provides two statements Commit & 
                                                      Rollback to complete the transactions In SQL if available are with DML Statements.

Datatypes In SQL

In SQL, each column have its datatype, it tells that what kind of value that column can contain.

  1. Character Strings
    1. Char
    2. VarChar
    3. NChar
    4. NVarChar
  2. Numbers
    1. Integer
    2. Float, Real  or Double.
    3. Numeric Or Decimal
  3. Date and Time
  4. Bit Strings
    1. Bit(n)
    2. Bit Varying(n)
Hope this post is helpful for you  all!!!!!!!!!
Thanks!!!!!!!

You Might Be Interested In:

No comments

Post a Comment

Powered by Blogger.