3 ms·
SQL is closer to C in this analogy. Most relational databases engines don't actually run SQL. They have a native internal programming language (closer to assemb
by jandrewrogers 5y ago
SQL is closer to C in this analogy. Most relational databases engines don't actually run SQL. They have a native internal programming language (closer to assembly code) that is much cleaner and sometimes more expressive, which SQL is translated into. This internal language is then either interpreted or JIT-ed into machine code. In rare cases, the internal language even has a nice expressive and composable text syntax that programmers can write directly. This makes everything easier and more flexible from perspective of people writing the database engine, even if the intent is to only ever run SQL queries at the public interface.
Most relational databases mostly don't run on SQL anymore, that is a legacy interface that is exported for compatibility. Unfortunately, that is still the only vaguely portable programming interface and everyone knows it, so that's what we use.