AfterAcademy Tech
•
19 Jan 2020

In order to handle a large volume of data we use some Database Management System and this Database Management System, the most popular DBMS is the Relational Database Management System that stores the data in the form of tables containing rows and columns. The question that arises here is that how data is being stored in the database? You might be using some programming language like Java or Kotlin to develop your application, but in order to store the data in the database, you need some kind of interface or language that will help in the communication between the user and the database. For example, if you know English and you want to communicate with someone that knows French only. So, in order to have communication between you and that guy, you need some kind of interpreter in between that will convert English to french and vice-versa. Similarly, SQL is used to have communication between the user and the database. In this blog, we will learn about SQL. So, let's get started.
SQL or Structured Query Language is simply a computer language that is used to establish a communication between the user and the database i.e. all the database related operations are performed using this Structured Query Language.
As the name suggests, SQL is used to manage the structured databases like RDBMS. Non-Structured databases can't be managed by SQL. Some of the Relational Database Management Systems like Oracle, MS Access, MySQL, etc uses SQL for all the operations on the database.
Some of the operations that can be performed with the help of SQL are:
These are some of the operations that can be performed on database with the help of SQL.
In SQL, we give some commands to the system to perform some operation. That command or the instruction is known as a Query. The system will take this query as an input and will give the desired output. So, there are some steps that are included in this whole process. So, let's look at the process involved in executing a SQL query.
In SQL, we write queries to perform certain operations. But those queries are in some high-level language and this high-level language must be converted to some low-level language because the system can understand the low-level languages only. So, following is the block diagram of Query processing in SQL:

Following is the description of the same:
Some of the advantages of using SQL are:
There are various types of SQL statements that are used for various different processes. These are:
DDL - Data Definition Language
Data Definition Language or DDL is used to define the database structure or schema. Some of the DDL commands are CREATE, ALTER, DROP, TRUNCATE, RENAME, COMMENT.
DML - Data Manipulation Language
Data Manipulation Language or DML is used to manage the data within some schema objects like inserting some data in the table or deleting some value from the table. Some of the DML commands are INSERT, UPDATE, DELETE, MERGE.
DCL - Data Control Language
Data Control Language or DCL is used to grant and remove access of schema objects to some users. Some of the DCL commands are GRANT, REVOKE.
TCL - Transaction Control Language
Transaction Control Language or TCL is used to manage the changes that are made by the DML commands. So, the changes made by the DML commands can be controlled by the DCL statements. Some of the DCL commands are COMMIT, ROLLBACK, SAVEPOINT.
Data Retrieval
Data Retrieval is used to retrieve or get data from the database. The SELECT statement is used to retrieve data from the database.
These are some of the statements that are used in SQL for performing various operations. We will learn more about these statements in some other blog in detail.
That's it for this blog. Hope you learned something new today.
Do share this blog with your friends to spread the knowledge. Visit our YouTube channel for more content. You can read more blogs from here.
Keep Learning 🙂
Team AfterAcademy!
AfterAcademy Tech
In this blog, we will learn about the various differences between SQL and SQL server based on some points.

AfterAcademy Tech
In this blog, we will learn about the view or virtual tables in SQL. We will also discuss various operations we can perform on views in SQL.

AfterAcademy Tech
In this blog, we will learn the difference between the embedded and dynamic SQL in deatail. We will also see which SQL statement to use when?

AfterAcademy Tech
In this blog, we will learn the difference between SQL and NoSQL databases.
