Define Assertions in SQL
a. An assertion is a predicate that is expressing a condition we wish the database to always satisfy.
b. Domain constraints, functional dependency and referential integrity are unique forms of assertion.
c. In which a constraint cannot be expressed in these forms, we use an assertion, for example
- Making sure the sum of loan amounts for each branch is less than the sum of all account balances at the branch.
- Making sure every loan customer keeps a minimum of $1000 in an account.