Adds SQL and validation checker.