1. Suppose you are a manufacturer of product ABC, which is composed of parts X,
ID: 3560221 • Letter: 1
Question
1. Suppose you are a manufacturer of product ABC, which is composed of parts X, Y, and Z. Each time a new product is created, it must be added to the product inventory, using the PROD_QOH in a table named PRODUCT. Also, each time the product ABC is created, the parts inventory, using PART_QOH in a table named PART, must be reduced by one each of parts X, Y, and Z. The sample database contents are shown in Table 1 below.
Table 1 Database for Problem
Table name: PRODUCT
PROD_CODE
PROD_QOH
XYZ
1,375
Table name: PART
PART_CODE
PART_QOH
X
495
Y
517
Z
387
Given that information, answer questions a through c.
a. How many database requests can you identify for an inventory update for both PRODUCT and PART?
b. Using SQL, write each database request you identified in question a.
c. Write the complete transaction(s).
Table name: PRODUCT
PROD_CODE
PROD_QOH
XYZ
1,375
Explanation / Answer
a.) There are two correct answers 4 or 2. Depending in how the SQL statements are done.
b.)
The database requests are shown in the following table.
Four SQL statements
Two SQL statements
UPDATE PRODUCT
SET PROD_QOH = PROD_OQH + 1
WHERE PROD_CODE =
Four SQL statements
Two SQL statements
UPDATE PRODUCT
SET PROD_QOH = PROD_OQH + 1
WHERE PROD_CODE =
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.