>>106260979
The term SQL is a bit of a misnomer. The real meaning is Structured Query Language. Its an interface on top of a low level executable which is what does the actual work. The point of it is that it abstracts away a lot of the complexity about "how" to do something. You tell it "what" to do and then it figures out the best way to go about it. That's why its called a "declarative" language instead of an "imperative" one. SQL itself is strictly just the interface (words you type in), but the database engine itself (the lower level executable) is what interprets the language and figures out the best way to do what you want to do. Both the interface and the engine are collectively grouped under the term SQL since you can't really do anything with just the interface by itself. NoSQL is another interface that offers different functionality because the engine does different things than a SQL engine can because both have slightly different end goals and use cases.
For an example of what a SQL engine can decide for you, imagine you have a table with 1 row, and a table with 1 billion rows, and your objective is to find all the rows that have the same ID in both tables. The most efficient way is to get the 1 row out of the table with 1 row, read its ID, and then use that ID to look up against a hash set of the billion table rows. If you did it the other way around, you would have to directly read 1 billion rows and look them up against 1 row. With SQL, you don't need to know ahead of time that the tables have X amount of rows and thus you need to do it in this specific way for the best performance. You just tell it the 2 tables and your goal and it works out the most efficient way to do it on its own.