Most relational databases handles a JDBC / SQL query in four steps:
parsing is one of the Process of compilation.
Phases of a Compiler:
Source: Phases of Compiler