You are the administrator of a SQL Server 2000 computer. The server contains a database na
When the parts have shipped, a table named PartsShipped is updated. When the parts are received, a table named PartsReceived is updated. The relationship of these tables is shown in the exhibit.
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.Create a user-defined function that calculates current inventory by running aggregate queries on the PartsShipped and PartsReceived tables.
C.Use a view that creates an InStock field as part of an aggregate query.
D.Create stored procedures for modifying the PartsShipped and PartsReceived tables that also modify the InStock field in the Parts table. Use these procedures exclusively when modifying data in the PartsShipped and PartsReceived tables.