Reference no: EM132493599
Q1 Going from these SQL relations, Product(maker, model, type) PC(model, speed, ram, hd, price) Laptop(model, speed, ram, hd, screen, price)
Printer(model, color, type, price)
Write the following queries in SQL:
a) Find the model number, speed, and hard-disk size for all PC's whose price is under $1000.
b) Do the same as (a), but rename the speed column gigahertz and the hd column terabytes.
c) Find the manufacturers of printers.
d) Find the model number, memory size, and screen size for laptops costing more than $1500.
e) Find all the tuples in the Printer relation for color printers. Remember that color is a boolean-valued attribute.
f) Find the model number and hard-disk size for those PC's that have a speed of 3.2 and a price less than $2000.
Part Two:
- Create E/R diagram for a database recording information about teams, players, and their fans, including:
- For each team, its name, its players, its team captain (one of its players), and the colors of its uniform.
- For each player, their name.
- For each fan, their name, favorite teams, favorite players, and favorite color.