Skip to content
Related Articles

Related Articles

SQL Full Form

View Discussion
Improve Article
Save Article
  • Last Updated : 12 Jun, 2020
View Discussion
Improve Article
Save Article

SQL is a declarative language laying its basics on relation algebra. It is a standardized language supported by all major commercial databases. The query optimizer is an important component of SQL which takes an input the SQL query and executes, it in the fastest way possible.

These are main classification of SQL queries:

  1. Data Manipulation Language (DML) –
    It deals with the queries related to insertion, deletion and modification of rows.

  2. Data Definition Language (DDL) –
    It deals with the creation, deletion and modification of definitions for tables and views.

A basic SQL query has the following syntax:

SELECT (attribute list)
FROM   (table list)
[WHERE (condition)]
[GROUP BY (grouping attributes)]
[HAVING (group condition)]
[ORDER BY (attribute list)] 

where the SELECT and FROM clauses are mandatory.

  1. The SELECT clause lists the attributes to be retrieved.
  2. The FROM Clause specifies all tables
  3. The WHERE clause specifies the conditions for selection of records from these tables, including join conditions.
  4. GROUP BY specifies grouping attributes
  5. HAVING specifies a condition for retrieval of groups.

Various aggregator functions COUNT, SUM, MIN, MAX, and AVG can be in conjunction with grouping. ORDER BY specifies an order for displaying the result of a query.

Characteristics :

  • Tables, also called as relations are represented by a name, not exceeding 20 characters in length.
  • The table names as well as the column fields should have unique names.
  • While table definition, the field list is separated using commas, and each field name consists of a data type followed by length attribute enclosed in brackets.
  • SQL statements must end with a semicolon.

Advantages :

  • High performance.
  • Easily compatible with most of the databases like MS Access, MS SQL server.
  • Good flexibility in terms of creation of new Data Base tables and deletion of redundant tables.
  • Can handle large records and multiple transactions.
  • Easily accessible in the form of an open-source programming language.
  • High Security: Tables, procedures and views can easily be protected using permissions
  • Easy to learn and understand data

Disadvantages :

  • Complex interface to understand and deal with it.
  • Higher cost required to set up.
  • It is a platform dependent and compound based language.
  • Extra space is required for each record storage.
  • Partial control given to databases, due to hidden permissions.
My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!