Question
Denormalization Suppose a pharmaceutical company has a DRUG table and a table for its price changes, which is organized as follows: DRUG (D#, Drug_Name, Drug_Type,
Denormalization
Suppose a pharmaceutical company has a DRUG table and a table for its price changes, which is organized as follows:
DRUG (D#, Drug_Name, Drug_Type, Quantity)
PRICE (D#, StartDate, EndDate, Price)
Note that the PRICE table has a composite primary key consisting of D# and StartDate. Every order must use the order date to find out the selling price when the order was placed. The (end date + 1 ) day is equal to the StartDate of the next price for the same drug. Every report, invoice, or query will have a join between Drug and Price. Assuming that the two most recent prices are the ones that are used in 95% of transactions, find the desirable schema that could improve the performance with less redundancy.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started