subject
Computers and Technology, 04.03.2021 20:00 musa79

Consider the following schema: SUPPLIERS (SID: integer, SNAME: string, STREET: string, CITY: string, ZIP: string) PARTS (PID: integer, PNAME: string, COLOR: string) CATALOG (SID: integer, PID: integer, COST: real)
The primary key attributes are underlined, and the domain of each attribute is listed after the attribute name. Thus, SID is the primary key for SUPPLIERS, PID is the primary key for PARTS, and SID and PID together form the primary key for CATALOG. Attribute SID in CATALOG is a foreign key that refers to the primary key SID of SUPPLIERS and PID in CATALOG is a foreign key that refers to the primary key PID of PARTS. The CATALOG relation lists the prices charged for parts by suppliers.
State what the following query computes.
0. πCITY (πPID (σ COLOR = 'green' (PARTS) ) * σ COST>50 (CATALOG) * πSID, CITY (SUPPLIERS) )
Write the following queries in relational algebra.
1. Find the names of parts for which there is some supplier
2. Find the names of parts supplied by suppliers who are at 1 Central Ave.
3. Find the names of suppliers who supply some red part.
4. Find the SIDs of suppliers who supply some red or green part.
5. Find the SID of suppliers who supply some red part or whose address is '221 Packer Street'.
6. Find the SIDs of suppliers who supply some red part and some green part.
7. Find the PIDs of parts that are red or are supplied by a supplier who is at the city of Newark.
8. Find the PIDs of parts supplied by a supplier who is at the city of Newark and by a supplier who is at the city of Trenton.
9. Find the PIDs of parts supplied by every supplier.
10. Find the PIDs of parts supplied by every supplier who supplies at least one part.
11. Find the SIDs of suppliers who supply at least two different parts (you are not allowed to use a grouping/aggregation operation for this query).
12. Find the SIDs of suppliers who supply at least two different parts (you have to use a grouping/aggregation operationfor this query).
13. For every part, find its PID, its PNAME and the number of suppliers who sell it.
14. List the PID, PNAME and average cost of all parts.
15. Find the average cost of red parts.
16. Find the average cost of parts supplied by suppliers named 'Yosemite Sham'.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 09:30
Which of the following tasks is an audio technician most likely to perform while working on a nature documentary? (select all that apply). eliminating potentially distracting background noise adding sound effects making sure the lighting is adequate for a particular scene changing the narration to better match the mood of the documentary
Answers: 3
question
Computers and Technology, 23.06.2019 15:30
The processing of data in a computer involves the interplay between its various hardware components.
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
What are some settings you can control when formatting columns?
Answers: 1
question
Computers and Technology, 24.06.2019 22:00
According to your study unit, what is the main reason that improved human relations skills may improve your grades?
Answers: 1
You know the right answer?
Consider the following schema: SUPPLIERS (SID: integer, SNAME: string, STREET: string, CITY: string...
Questions
question
Mathematics, 08.12.2020 20:50
question
Mathematics, 08.12.2020 20:50
question
Chemistry, 08.12.2020 20:50
question
Mathematics, 08.12.2020 20:50
question
Health, 08.12.2020 20:50
Questions on the website: 13722360