Question: There are two tables, Part and PartSupply. Part has columns partkey, name, and price. PartSupply has columns partkey, supplykey, quantity, and supplycost. I need to
There are two tables, Part and PartSupply. Part has columns partkey, name, and price. PartSupply has columns partkey, supplykey, quantity, and supplycost. I need to implement a constraint or trigger that if a part's price changes then the supplycost for any row in partsupply should change by the same amount. So if a part's price increased by 10 percent then all rows in supplycost that correspond to that part should have a 10 percent increase in the supplycost. This needs to be in postgresql. I was wondering if someone could explain to me how to go about doing this.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
