Introduction to Structured Query Language (SQL)

Introduction to Structured Query Language (SQL)

The complete name of SQL is Structured Query Language. It is also called “language of databases”. SQL is used to communicate with the database. This is the standard language used for relational databases.

Popular Relational Database Management Systems, like Oracle and SQL Server (a relational database management system that has been created by Microsoft), uses SQL to communicate with the database.

The first version of SQL came in 1974. This happened when the IBM company had created the first relational database demo based on the relational model of E.F codd.

SQL is a standard but still uses different vendors (Microsoft, Oracle) according to its environment according to its use. There are 2 reasons for this.The first reason is that the standard of SQL is very complex and it is very difficult to fully implement it. Another reason for this is that every vendor has to show their own software different from other software.

Features of SQL

Some features of the lower SQL are being told.

  1. SQL is a standard for creating and manipulate SQL databases.
  2. SQL provides the facility to manipulate data.
  3. SQL can be easily learned by anyone.
  4. SQL supports many different DBMS such as Oracle, MySQL, MS Access and MS SQL Server etc.

SQL is a very easy language. You do not have to have any programming experience for learning SQL. SQL is similar to simple English language.

In this you write statements using some keywords and interact with the database. It’s just like interacting with a human you just have to know the use of keywords.

Below are some basic keywords that you will be using soon.

  • SELECT
  • INSERT
  • UPDATE
  • DELETE
  • TRUNCATE
  • DROP
  • CREATE
  • JOIN
  • ALTER
  • ADD

There are 3 types of statements in SQL. Let’s try to know about them.

  1. DDL (Data Definition Language) – DDL statements are used to define the database structure. Define means that whenever you do this, there are some changes in the structure of the database such as creating a new table or modifying the existing table etc. With DDL statements you can perform tasks given below.
  2. With DDL statements you can create a new table.
  3. You can add new rows or columns to existing tables.
  4. Create and delete the database.
  5. Users can grant and revoke privilege.
  6. Can analyze information about Tables and add comments.
  7. With DML statements, you enter data into the table.
  8. Data can also be updated.
  9. You can also delete the data.
  10. With DML statements you can also merge 2 tables.
  11. TCL (Transmission Control Language) – The change that comes in data from DML statements is managed by TCL statements. Such as to make a change permanent or undo it. TCL statements perform tasks given below.