Categories: PLSQL Tutorials

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
SAP HANASQLScriptSQLScript
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

Values(‘1′,’Amit’);

commit;

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.

Amit S

Oracle Consultant with vast experience in Oracle BI and PL/SQL Development. Amiet is the admin head of this website who contributes by preparing tutorials and articles related to database technologies. He is responsible to manage the content and front-end of the website.

Share
Published by
Amit S

Recent Posts

What is mean by SLA ( Service Level Agreement) with Examples?

In my previous articles i have given the hierarchy of production support in real company…

12 hours ago

What is Production support Hierarchy in organization?

In this article i would like to provide information about production support organization structure or…

13 hours ago

What are roles and responsibilities for L3 Support Engineer?

In my previous article I have given roles for L1 and L2 support engineer with…

14 hours ago

What are roles and responsibilities of L2 Engineer?

I have started this new series of how to become application support engineer. This article…

16 hours ago

What are Roles and Responsibilities of L1 Support Engineer with real industry examples?

In this series we are starting with Roles and responsibilities of L1 support engineer .…

18 hours ago

The Essential Guide to Cryptocurrency Exchange Platform Development for Beginners and Beyond

Introduction Cryptocurrencies took the world by storm, setting up a new financial system and breaking…

12 months ago