Development

What Does SQL Stand For?

Captain Salem 3 min read
What Does SQL Stand For?

Structured Query Language, or SQL for short, is a popular and standard language for interacting and querying information in a relational database.

Databases are everywhere, starting from small hand-held devices to massive applications running on the cloud. Although there are many database systems, the most popular and influential are relational databases.

Using the SQL language, you can perform operations such as adding data, fetching information, searching, updating, performing optimizations, deleting records, and many more.

How does SQL Works?

As database administrators, we rarely need to understand what goes on under the hood once we run an SQL query. Although this type of abstraction is heavily proper, it can limit those who need to understand the inner workings of a database.

NOTE: There are various variations of the SQL language, and therefore challenging to lay out how it works universally.

However, it is evaluated in three simple steps once you run an SQL query.

  1. Compilation/Query Parser – The first is a query parser. This step ensures that the SQL query executed follows the defined syntax.
  2. Compilation/Binding – The SQL query is checked for schematics and a query plan is created for the statement in the binding process. The plan is comprised of a binary representation of the steps to be followed during the execution of the specified query.
  3. Optimization – Once the query plan has been generated in the binding step, it is taken to the optimization stage. Here, the best algorithm is chosen for the provided query plan.
  4. Execution – The final step is the run the SQL statement by executing the query plan.

The flow chart below illustrates the above steps:

NOTE: Keep in mind that this is a high-level overview of the workings of a SQL Engine. Various database engines may implement these processes differently.

Types of SQL Statements

SQL is a query language that uses a statement-like format. For example, to fetch all the tables in a table, you can use a statement as:

SELECT * FROM table_name;

There are various types of queries in SQL. They are organized as follows:

  1. Data Definition Languages – DDL Queries
  2. Data Manipulation Language – DML Queries
  3. Transaction Control Queries
  4. Session Control Queries
  5. System Control Queries
  6. Data Control Language
  7. Data Query Language

Although the above are common SQL Query types, they may vary depending on the engine implementation. Feel free to reference your database engine documentation to learn more.

Common SQL Terminology

The following are common terminologies you will hear when working with SQL and SQL-related databases.

  1. Database – a database refers to a collection of tables, views, indexes, operators, functions, etc.
  2. Query – A query is a command that acts on the SQL data. These types of queries are classified in the types mentioned above.
  3. Client – An SQL Client is any application or connection that interacts with the database in an independent function.
  4. Server – An SQL server is a program that hosts the database and processes all incoming SQL queries from the connected clients.
  5. Transaction – An SQL transaction is a collection of more SQL queries treated and executed as a single unit. In most cases, transactions are atomic. This means that if one of the queries fails, the entire transaction fails. However, this feature may vary depending on the database engine.
  6. Result or Result set – A result is simply a result of a query to the database.
  7. RDBMS – Relational Database Management System. Refers to a program that offers an SQL Server allowing you to store, manage, query, and fetch data stored in a SQL database. Popular RDBMS include MySQL, SQL Server, PostgreSQL, Oracle, etc.

The above are the most basic and standard terminologies in the SQL world. However, keep in mind that this is only a minimal list. SQL is extensive and contains a plethora of other terms.

Conclusion

In this article, we introduced you to the theoretical part of SQL Language. Hence, using our SQL tutorials, you will explore how SQL works, various features, and how to use it.

Thanks for reading, and stay tuned for more.

Share
Comments
More from Cloudenv

Cloudenv

Developer Tips, Tricks and Tutorials.

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to Cloudenv.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.