Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the following schema. Write the following five queries based on your choice in QBE: Suppliers ( sid: integer, sname: string, city: string ) Parts
Consider the following schema. Write the following five queries based
on your choice in QBE:
Supplierssid: integer, sname: string, city: string
Partspid: integer, pname: string, color: string
Orderssid: integer, pid: integer, quantity: integer
For each supplier from whom all of the following things have been ordered in quantities of at
least print the name and city of the supplier: a blue gear, a red crankshaft, and a yellow
bumper.
Print the names of the purple part Print the names and cities of suppliers who have an order for more than units of a yellow
or purple part.
Print the pids of parts that have been ordered from a supplier named American but have also
been ordered from some supplier with a different name in a quantity that is greater than the
American order by at least units.
Print the names of the suppliers located in Madison. Could there be any duplicates in the
answer?
Print all available information about suppliers that supply green parts.
For each order of a red part, print the quantity and the name of the part.
Print the names of the parts that come in both blue and green. Assume that no two distinct
parts can have the same name and color.
Print in ascending order alphabetically the names of parts supplied both by a Madison
supplier and by a Berkeley supplier.
Print the names of parts supplied by a Madison supplier, but not supplied by any Berkeley
supplier. Could there be any duplicates in the answer?
Print the total number of orders.
Print the largest quantity per order for each sid such that the minimum quantity per order for
that supplier is greater than
Print the average quantity per order of red parts.
Can you write this query in QBE? If so how? Print the sids of suppliers from whom every
part has been ordered
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