How Do SQL Database Engines Work?

Daniel felipe Escobar chavez
3 min readJul 20, 2021

--

Hello, how are you, programming friends, today I have prepared a blog to explain in the simplest way and for everyone, how sql works and what is so let’s start.
sql is a programming language which is based on storing data and using it, eliminating it, inserting it and creating others, among other things.

Now we can see here the script of sql inside and basically with these means it is that sql works by having an interface in which the sql commands work thanks to a tokenizer that takes the information to the code generator and this evolves it to the sql commands, basically this part recognizes what we do on the machine and the virtual machine part is the machine itself and how it manages to work in a loop.
having explained this now let’s see how sql works graphically:

Here we can see a saved database where we ask about countries and states with their respective altitude, so basically this is what is done in sql, create data and organize it to be able to access them easily, now in mysql we could do is SELECT FROM table (the name of our table) WHERE city = San Diego and what will happen is this:

What I did in the first place is select the city San Diego so my sql will only select that column of information, we can also be more specific since as we see there are two coumnas that have Arizona as their state so we will have to be more specific:

SELECT FROM table WHERE state = Arizona AND hight = 105

In this way we will select the first column referring to an element that the others have, which is Arizona:

now you know the magic power of lists, and the importance of sql with which we can select specific data when we need it.

but not only that, we can also select all the data columns like this

SELECT * FROM table ORDER BY rowdin
This will organize the values ​​from lowest to highest and with DESC from highest to lowest as in the example:

in addition we can also organize it by a value in the data such as cities
SELECT * FROM table ORDER BY city:
With this, it will be selected by the cities, so with that we can see that these databases help us to play and interact with the data that we have in our possession, and if you still do not understand it well or have problems understanding it, think about it as if the database is a shopping list and the data to interact are the ingredients we need for a meal so we are only going to take the ones we need.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response