What is SQL used for? | SQL Usages

In my previous article i have given the answer of the question Is SQL a programming language with examples.In this article i would like to throw light on most asked question in SQL interviews – What is SQL used for? The SQL is structured query language which is used to perform the operations of database. SQL is used for multiple purposes. In this article i would like to give the multiple usages SQL in simple words.

What you will find in this article?

Introduction to SQL and its database management systems.

SQL usages with Examples

Introduction to SQL and its database management systems :

The SQL is structured query language which is the database management system or domain specific programming language which is used to perform the multiple operations on the databases. The SQL language is usually dealing with the tables and used to perform the operations on tables. You can perform following operations using SQL :

  1. User can create a database and tables.
  2. User can manipulate the data in the table
  3. User can update or delete data from the table
  4. User can control the database transactions
  5. User can control the access of multiple users who needs to utilize the data.
  6. SQL can be used in relational as well as multidimensional databases.

Every database management system uses the SQL as database programming language. The name of the database programming language is quite different. In following table i would like to give the name of the programming languages.

Database Management SystemsName of SQLFull Form of SQL name
OracleSQLStructured Query Language
OraclePLSQLProcedural Language Structured Query Language
IBM DB2SQL PLSQL Procedural Language (implements SQL/PSM)
IBM InformixSPLStored Procedural Language
IBM NetezzaNZPLSQL[20](based on Postgres PL/pgSQL)
InvantivePSQL[21]Invantive Procedural SQL (implements SQL/PSM and PL/SQL)
Microsoft / SybaseT-SQLTransact-SQL
Mimer SQLSQL/PSMSQL/Persistent Stored Module (implements SQL/PSM)
MySQLSQL/PSMSQL/Persistent Stored Module (implements SQL/PSM)
MonetDBSQL/PSMSQL/Persistent Stored Module (implements SQL/PSM)
NuoDBSSPStarkey Stored Procedures
OraclePL/SQLProcedural Language/SQL (based on Ada)
PostgreSQLPL/pgSQLPostgreSQL (implements SQL/PSM)
SAP R/3ABAPAdvanced Business Application Programming
SybaseWatcom-SQLSQL Anywhere Watcom-SQL Dialect
TeradataSPLStored Procedural Language
Database Management System

What is SQL used for?

In this section i would like to give usages of SQL database management system. In most of database management systems we are using the SQL as database programming languages. I would like to give you multiple usages of SQL in real life industry.

  1. Production Support and Application support :

We can use the multiple SQL queries in production support and application support. The most of the production support issues are related to database and you need to fire some queries and resolve the issue.

Example :

If you want to fetch all data of customer named “Amit”

select * from Customer where name=”Amit”;

  1. Creation of the table and work on its controls

You can use the SQL to create the table and work differently on it. You can use those tables in development and adding the business logic.

SQL Create table
  1. Reporting

The SQL DDL statements are used to fetch the particular data in the reporting format. The most important use for SQL is it is used for reporting purpose.

Example :

If you want to fetch the customer information and products information together for report preparation you need to use the joins in SQL.

Select a.Customer_name,b.product_name from Customer a,Product b where a.customer_id=b.product_id;

  1. Data Entry

The SQL is used for data entries . The back-end query will be the insert statement in SQL.

Example :

Insert into Customer



5.Bulk data entry :

We can use the SQL to insert the bulk data through the excel or other mediums. It will be easy to insert the data and save the time.

6.Controlling the Access :

You can control the access with using grant and revoke statements. It will control the access of multiple users.

7.Adding Business Logic :

We can use procedures,functions and triggers,packages to add the business logic in the specified application.

Example :

In banking domain we require to add the accounts if and only if the balance is 500. We require to use the trigger over-here.

  1. Data Analysis :

SQL queries are useful for manual data analysis. We can use that data to build the software.

  1. Website Hosting :

For any website development the SQL is important as backend. So we are using the multiple databases to host the website.

10.Application Performance :

The SQL indexes,partitions,gathering stats can be used to improve the performance of the application.

I hope you get the idea about usages of SQL for with multiple examples. The SQL is key database management system in mostly every application.If you like this article or if you have any issues with the same kindly comment in comments section.

Leave a Reply

Your email address will not be published. Required fields are marked *