Sunday 13 December 2015

Q16,p2,J15. An expression is a predicate expressing a condition, we wish database to always satisfy. The correct syntax for assertion is

A) CREATE ASSERTION 'ASSERTION NAME'  CHECK 'PREDICATE'
B)  CREATE ASSERTION 'ASSERTION NAME'
C)CREATE ASSERTION   CHECK 'PREDICATE'
D)SELECT ASSERTION.

Answer A.
Explanation.
  1. An assertion is a predicate expressing a condition we wish the database to always satisfy.
  2. Domain constraints, functional dependency and referential integrity are special forms of assertion.
  3. Where a constraint cannot be expressed in these forms, we use an assertion, e.g.
    • Ensuring the sum of loan amounts for each branch is less than the sum of all account balances at the branch.
    • Ensuring every loan customer keeps a minimum of $1000 in an account.
  4. An assertion in DQL-92 takes the form,
     create assertion  assertion-name check predicate

No comments:

Post a Comment

Note: only a member of this blog may post a comment.