What should you do to ensure that the view cannot be affected by modifications to underlying table schemas?

You are work as a database administrator at Domain.com. Your duties at Domain.com include the administrating of the SQL Server 2005 computer named Certkiller -DB07.
Certkiller -DB07 hosts a database named CK_Sales that stores sales transactions for the company. The table structure for the CK_Sales database is shown in the following exhibit:

You are busy creating a view to join the Customers and Invoices tables. You want to ensure that the view cannot be affected by modifications to underlying table schemas.
exhibit What should you do?

You are work as a database administrator at Domain.com. Your duties at Domain.com include the administrating of the SQL Server 2005 computer named Certkiller -DB07.
Certkiller -DB07 hosts a database named CK_Sales that stores sales transactions for the company. The table structure for the CK_Sales database is shown in the following exhibit:

You are busy creating a view to join the Customers and Invoices tables. You want to ensure that the view cannot be affected by modifications to underlying table schemas.

What should you do?

A.
You need to create CHECK constraints on the tables.

B.
You need to create a DDL trigger to roll back any changes to the tables if the changes affect the columns in the view.

C.
You need to create the view, specifying the WITH SCHEMABINDING option.

D.
You need to create the view, specifying the WITH CHECK option.

Explanation:
When you create a view and specify the SCHEMABINDING option, you cannot drop any tables, views, or functions referenced by the view without first dropping the view.



Leave a Reply 0

Your email address will not be published. Required fields are marked *