In solidDB®’s DML execution model, thesolidDB® server performs a number of validation checks before executing data manipulation statements (INSERT, UPDATE, or DELETE). Following is the execution order for data validation, trigger execution, and integrity constraint checking for a single DML statement.
1 Validate values if they are part of the statement (that is, not bound). This includes null value checking, data type checking (such as numeric), and so on.
2 Perform table level security checks.
3 Loop for each row affected by the SQL statement. For each row perform these actions in this order:
a Perform column level security checks.
b Fire BEFORE row trigger.
c Validate values if they are bound in. This includes null value checks, data type checking, and size checking (for example, checking if the character string is too long).
Size checking is performed even for values that are not bound.
d Execute INSERT/UPDATE/DELETE
e Fire AFTER ROW trigger
4 Commit statement
a Perform concurrency conflict checks.
b Perform checks for duplicate values.
c Perform referential integrity checks on invoking DML.
Note A trigger itself can cause the DML to be executed, which applies to the steps shown in the above model.