Multiple choice technology programming languages

While creating a view from two tables, you need to ensure that view cannot be affected by modifications to underlying table schema. What should you do to accomplish this goal with least possible amount of overhead?

  1. Create CHECK constraints on the tables

  2. Create a DDL trigger to rollback any changes to the tables if then changes affect the columns in the view.

  3. Create the view, specifying the WITH SCHEMABINDING option.

  4. Create the view, specifying the WITH CHECK option.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

SCHEMABINDING locks the view definition to the exact schema of underlying objects, preventing any schema changes (like dropping or renaming columns) that would break the view. This is a lightweight, declarative solution that imposes minimal overhead compared to triggers or manual constraint checking. It's the standard way to protect view integrity.