SQL is the language that you use to make requests of Teradata Database, that is, you use SQL to query Teradata Database.
The SQL parser handles all incoming SQL requests in the following sequence:
The Parser looks in the Request cache to determine if the request is already there.
IF the request is… |
THEN the Parser… |
in the Request cache |
reuses the plastic steps found in the cache and passes them to gncApply. Go to step 8 after checking privileges (step 4). Plastic steps are directives to the database management system that do not contain data values. |
not in the Request cache |
begins processing the request with the Syntaxer. |
IF there are… |
THEN the Syntaxer… |
no errors |
converts the request to a parse tree and passes it to the Resolver. |
errors |
passes an error message back to the requestor and stops. |
IF the privileges are… |
THEN the Security module… |
valid |
passes the request to the Optimizer. |
not valid |
aborts the request and passes an error message and stops. |
Concrete steps are directives to the AMPs that contain any needed user- or session-specific values and any needed data parcels.
gncApply passes the concrete steps to the Dispatcher.