Question: how to write operations that are nedd to a compose for the following scenario part_no description units_on_hand class warehouse unit_price AX12 AX52 BA74 BH22 BT04
how to write operations that are nedd to a compose for the following scenario
| part_no | description | units_on_hand | class | warehouse | unit_price |
| AX12 AX52 BA74 BH22 BT04 BZ66 CA14 CB03 CX11 CZ81
| IRON SKATE BASEBALL TOASTER STOVE WASHER SKILLET BIKE MIXER WEIGHTS | 104 34 234 25 23 16 123 56 142 209
| HW SG SG HW AP AP HW SG HW SG | 3 2 1 3 2 3 3 4 3 2 | 179.95 24.95 4.95 34.95 402.99 311.95 19.95 187.50 57.95 108.99 |
What operations are needed to compose a transaction for the following scenario:
Willie Jones ordered 3 basketballs and one bike from the company on December 15, 2015.
1. Insert one tuple into table orders for customer Willie Jones order on December 15, 2015
2. Insert one tuple for description = basketballs in table order_lines
3. Insert one tuple for description = bike in table order_lines
4. UPDATE: subtract 3 from units_on_hand in table parts description = basketball
5. UPDATE: subtract 1 from units_on_hand in table parts description = bike
6. UPDATE: add the price of 3 basketballs and 1 bike to Willie Jones balance in customer table
7. UPDATE: add new commission for Willie Jones sls_rep (William Smith) by multiplying order cost by commission_rate
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
