Computers and Technology

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 supplier2. 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 operation for 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'.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 13:50, mrfishyyyy
Explain how email technologies enable the exchange of messages between users. find out the typical parts of an email address and explain each part.
Answers: 1
image
Computers and Technology, 24.06.2019 10:30, johngayden46
This device directs network traffic. bridge hub nic repeater router switch
Answers: 3
image
Computers and Technology, 24.06.2019 11:20, isabelperez063
Every telecommunication setup uses two devices: one device to transmit data and one device to receive data. which device transmits frequencies to mobile phones? towers transmit frequencies to mobile phones.
Answers: 1
image
Computers and Technology, 24.06.2019 14:00, makaylahunt
Text or graphics that print at the bottom of every page are called footings footers headers headings
Answers: 1
Do you know the correct answer?
Consider the following schema: suppliers (sid: integer, sname: string, street: string, city: str...

Questions in other subjects:

Konu
Mathematics, 30.10.2020 16:20