Question 1
Background
The HumanResources database contains a table, named Staff.
A number of read-only, historical reports that make use of various queries, which execute simultaneously, to assess workforce costs, include totals that transform on a regular basis. When you are informed that the running of the workforce assessment reports is not constant, you are required to examine the database to detect the reason for this happening.
It is your intention to install the application on a database server supporting other applications. The storage space required by the database should be reduced.
Application
An application that updates the Staff table calls two stored procedures, named UspStaffA and UspStaffB, simultaneously and asynchronously. UspStaffA only updates the Staffstatus column, while UspStaffB only updates the StaffPayRate column
The application controls access to information by making use of views that permit user access to all columns in the tables that the view accesses, but also limit updates to the rows that the view returns.
You are required to create a view that will be used to permit users to modify data in the Staff table. This view must also block users from accessing the view definition in catalog views.
Which of the following is the view attribute that should be used to block users from accessing the view definition in catalog views?
Answer and explanation
Correct answer: C
SCHEMABINDING is required for creating indexed views in SQL Server, which are essential for improving performance of read-only historical reports with simultaneous queries and changing totals. When a view is created with SCHEMABINDING, the underlying tables cannot be modified in ways that would affect the view definition, ensuring data consistency and allowing SQL Server to create indexes on the view. ENCRYPTION only protects view definition code, CHECK OPTION validates data modifications (not applicable for read-only reports), and VIEW_METADATA controls metadata access but does not enable performance optimizations through indexed views.