Orange bullet points
Data Engineering Basics
3.7.2025

What is SQL? A simple explanation of the vocabulary needed to handle databases

Data Integration in data mining
Background blur
Left arrow orange
See all blogs

Introduction

Whether you are an engineer or not, you need to be able to handle data freely in order to survive in the coming data age. And when dealing with data, you cannot avoid SQL (SQL), which we will explain in this article.

Unlike before when data handling was limited to engineers, nowadays data utilization is required regardless of department or job type, so even non-engineers can benefit greatly from deepening their understanding of SQL. Let's understand it one by one.

What is SQL?

As explained on many websites, SQL can be summed up as a language for manipulating databases. It is used to operate database management systems (RDBMS) that are in a table format, such as Excel sheets.

Traditionally, SQL was used mainly by so-called data engineers, engineers who specialize in handling data, but modern web applications are mostly composed of a three-tier structure of web servers, application servers, and database servers, and database use is no longer limited to data engineers. Also, as will be described later, large amounts of data are now being used in fields other than engineering, such as sales and marketing, and SQL is beginning to be used to process that data.

What can you do with SQL?

Even without using SQL, we usually handle data using spreadsheet software such as Excel or Google Spreadsheets. For example, you can select a row on an Excel sheet and delete it, or insert a new row above or below it, and other data manipulation functions are available using the software's functions. Anyone can now perform advanced data manipulation such as searching and replacing data and performing calculations using functions.

However, there is a limit to the amount of data that can be processed by spreadsheet software, and some people may have experienced the software freezing up and being unable to process data that exceeds this limit when trying to do the same thing.

One of the weaknesses of spreadsheet software is that it is not suitable for quickly manipulating large amounts of data, in exchange for its ease of use and flexibility. In such cases, the solution is to use a separate database tool that can process large amounts of data at high speed.

This includes databases such as MySQL, PostgreSQL, and Oracle database, and DWHs ( data warehouses ) such as Google BigQuery, Amazon Redshift, and Snowflake, and SQL is used to give these tools written instructions on how to process data. The greatest advantage of SQL is that it enables high-speed processing of large amounts of data through the operation of database tools.

In addition to database tools, Salesforce uses the SQL-based SOQL (Salesforce Object Query Language) , which is specialized for retrieving object data. For services that handle huge amounts of data and require data extraction under complex conditions or large-scale data manipulation, it is often possible to use SQL itself, or a language based on SQL that is optimized for the service.

As such, the use of SQL has been increasing in recent years in sales and marketing-related tools, which is why learning SQL is said to be of great benefit to everyone.

Learning SQL

When we think of learning a language, we may imagine programming languages ​​such as Java or C++, but learning SQL is not that difficult compared to those languages. Also, the basic concept can be thought of as an extension of spreadsheet software, so if you already have experience using EXCEL or Google Spreadsheets, it is easily mastered.

Specifically, it would be a good idea to start by learning the basic syntax from an introductory book, and then get your hands dirty and manipulate sample data.

Among them, " SQL Introduction 3rd Edition with 256 drill questions! (Introduction Series) " by Kiyotaka Nakayama  (Author), Rieko Iida (Author), FlareLink Inc. (Editor) is a highly recommended book with many features aimed at beginner engineers or students who want to become more IT-savvy.

This book provides a virtual SQL environment that runs on a web browser, so users who just want to try it out don't need to go through the hassle of setting up an environment. There's also no need to prepare data for learning in advance, which is another reason why this book is recommended.

If you already have a tool that uses SQL, such as the aforementioned Salesforce, you can use what you've learned to actually manipulate data, which will help you retain the knowledge even more.

Also, if you have a hard time imagining how the SQL you are writing works, always imagine a large Excel sheet in your head and first imagine how you would operate on that sheet if you were to do it in Excel, and then imagine how you would write it in SQL. This will help you to match what you want to do in your head with the SQL you are writing.

Towards advanced learning

Here are some step-up steps for those who have completed introductory SQL learning and are able to handle the basic syntax.

Application to spreadsheet software

We have mentioned earlier that EXCEL and Google Spreadsheets are not suitable for processing large amounts of data. However, for example, Google Spreadsheets allows you to use SQL-like QUERY functions to search and extract data faster than on-screen operations. Also, by migrating your database from Google Spreadsheets to a tool more suited to engineers, such as Google CloudSQL or Google BigQuery, you can significantly increase the amount of data you can handle.

Learning Regular Expressions

One of the most important aspects of data handling is to search for data more easily and thoroughly, and regular expressions are a great tool for doing so.

We won't go into a detailed explanation of regular expressions, but in short, they are a concept for searching a group of strings with variations in spelling and notation using a single expression. For example, even if you try to search for postal code data from a certain string, only one postal code will be returned in one search. However, if you focus on the structure of a postal code, "3 half-width numbers + '-' + 4 half-width numbers," and express this as a regular expression, you can search for all postal codes with the search "^[0-9]{3}-[0-9]{4}$."

As you learn SQL and use databases, it may be useful to learn about regular expressions at the same time. Also, like SQL, regular expressions do not only work with specific tools, but are a highly versatile concept that can be used in most tools that require string searches, such as word processing software like Word and text editors.

SQL command types

Finally, here are some typical SQL commands:

SQL is an imperative language. It operates on a database by sending commands and making queries. SQL commands are broadly classified into four types:

DDL (Data Definition Language)

These are commands that define a database. These commands include creating, deleting, and merging database objects such as tables.

  • CREATE Statement
    • Creating databases and tables
  • DROP Statement
    • Deleting a database or table
  • ALTER Statement
    • Changing the definition of a database or table

DML (Data Manipulation Language)

These are commands to manipulate data, such as retrieving, adding, deleting, and updating records.

  • SELECT Statement
    • Retrieving specific data from a database
  • INSERT Statement
    • Adding new data to the database
  • UPDATE Statement
    • Run updates against data in the database
  • DELETE Statement
    • Delete specific data from the database

DCL (Data Control Language)

These are commands that control the use of data. These include controlling permissions for data and tables.

  • GRANT Statement
    • Grant access to users who want to access the database
  • REVOKE Statement
    • Revoke privileges from users accessing the database

TCL (Transaction Control Language)

These are commands related to starting and ending a transaction. In some DBMS, they may be classified as DCL.

  • COMMIT Statement
    • Commit a transaction (a series of operations on a database)
  • ROLLBACK Statement
    • Abandon the transaction and roll back to the state before the transaction was executed

summary

I hope you can see that even non-engineers can benefit from learning SQL. More than 30 years have passed since SQL was standardized, and although it has been updated several times, the number of situations in which it is used continues to increase. Be sure to learn SQL to expand the scope of your data usage.

In addition, our data analysis infrastructure construction service, TROCCO® , uses SQL for data mart definitions and dbt integration functions, and by writing SQL, it is possible to easily build a more advanced data pipeline (the flow of data from collected data to data analysis). Of course, it is also possible to build a data analysis infrastructure with almost no SQL.

If you are interested in efficiently linking, organizing, and managing data, or if you are interested in the product, please take a look at the materials.

TROCCO is trusted partner and certified with several Hyper Scalers