Updatable views: to update a view, the DBMS must be able to map the update to which underlying element(s)?

Difficulty: Medium

Correct Answer: a particular row in a particular underlying table

Explanation:


Introduction / Context:
Not all views are updatable. When they are, the DBMS must deterministically translate the view update into an underlying base-table operation on exactly one target row.



Given Data / Assumptions:

  • The view references underlying base table(s).
  • We are considering UPDATE/DELETE/INSERT via the view.
  • Deterministic mapping is required (no ambiguity).


Concept / Approach:
For an UPDATE to be valid, the DBMS must locate the row in a specific base table that corresponds to the row seen through the view. Column mapping follows from the view SELECT list, but the critical requirement is identifying the exact base table row, typically via keys.



Step-by-Step Solution:

Consider an update like UPDATE v SET salary = salary + 1000 WHERE emp_id = 10.The engine must find the row in base table EMP where emp_id = 10.Thus the essential mapping is to “a particular row in a particular underlying table.”


Verification / Alternative check:
DBMS rules often disallow updating views with joins or aggregates because the target base row(s) cannot be uniquely determined.



Why Other Options Are Wrong:

  • “Particular column in a table/row” focuses on attributes, but without the row identity the update cannot be applied.
  • “None” is incorrect because successful updates require a precise row mapping.


Common Pitfalls:
Expecting to update complex views (joins, GROUP BY) without INSTEAD OF triggers or rules that guide the mapping.



Final Answer:
a particular row in a particular underlying table

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion