Question
Indicate how you would express the integrity constraints listed below in SQL assuming the following schema modeling the inventory of a computer store: Product (maker,
Indicate how you would express the integrity constraints listed below in SQL assuming the following schema modeling the inventory of a computer store: Product (maker, model, type) PC (model, speed, ram, hd, price) Laptop (model, speed, ram, hd, screen, price) Printer (model, color, type, price) For this schema, the Product relation gives the manufactuer, model number and type (PC, laptop or printer) of various products. You may assume for convenience that model numbers are unique over all manufacturers and product types. The PC relation gives for each model number that is a PC the speed (of the processor in Ghz), the amount of RAM (in GB), the size of the hard disk (in TB) and the price. The Laptop relation is similar, except that the screen size (in inches) is also shown. The Printer relation records for each printer model whether the printer produces color output (true, if so), the process type (laser or ink-jet) and the price.
a) When updating the price of a PC, check that there is no lower priced PC with the same speed
b) No manufacturer of a PC may also make laptops
c) A manufacturer of a PC must also make a laptop with at least as great a processor speed.
d) Every Printer model number should appear in Product.
e) If a laptop has more main memory than a PC, then it must also be more expensive than a PC.
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