You are the administrator of a SQL Server 2000 computer. The server contains a database named Inventory. The database has a Parts table that has a field named InStock.When parts are shipped, a table named PartsShipped is updated. When parts are received, a table named PartsReceived is updated. The relationship of these tables is shown in the exhibit. (Click the Exhibit button.) You want the database to update the InStock field automatically. What should you do?

A) Add triggers to the PartsShipped and the PartsReceived tables that update the InStock field in the Parts table.

B) Use a view that creates anInStock field as part of an aggregate query.

C) Create stored procedures for modifying the PartsReceived and the PartsShipped tables that also modify the InStock field in the Parts table. Use these procedures exclusively when modifying data in the PartsReceived and the PartsShipped tables.

D) Create a user-defined function that calculates current inventory by running aggregate queries on the PartsShipped and PartsReceived tables.

View Answer
Option – A.