The main responsibilities of the relational engine are:
The parser scans an SQL statement and breaks it down into the logical units, such as keywords, parameters, operators, and identifiers. The parser also breaks down the overall SQL statement into a series of smaller logical operations.
There are typically many different ways that the server could use data from the source tables to build the result set. The optimizer determines what these various series of steps are, estimates the cost of each series (primarily in terms of file I/O), and chooses the series of steps that has the lowest cost. It then combines the specific steps with the query tree to produce an optimized execution plan.
These statements are not the typical SELECT, INSERT, DELETE, or UPDATE statements, and have special processing needs. Examples are the SET statements to set connection options, and the CREATE statements to create objects in a database.