SQL conformity.
Moved database errors to database package.