| 1. |
For Each Of The Views, Explain How Updates Would Be Performed (if They Should Be Allowed At All)? |
|
Answer» To insert (account-number, name) into the view deer-park we insert the tuple (Deer Park, account-number, null) into the account relation and the tuple (name, account-number) into the depositor relation. Updates to the VIEWS no-debt and avg-bal present SERIOUS problems. If we insert into the no-debt view, the system must reject the insertion if the customer has a LOAN. The OVERHEAD of updating through this view is so high that most systems would disallow UPDATE. The avg-bal view cannot be updated since the result of an aggregate operation depends on several tuples, not just one. To insert (account-number, name) into the view deer-park we insert the tuple (Deer Park, account-number, null) into the account relation and the tuple (name, account-number) into the depositor relation. Updates to the views no-debt and avg-bal present serious problems. If we insert into the no-debt view, the system must reject the insertion if the customer has a loan. The overhead of updating through this view is so high that most systems would disallow update. The avg-bal view cannot be updated since the result of an aggregate operation depends on several tuples, not just one. |
|