subject

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'.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 22:00, richellemjordan
Draw the hierarchy chart and design the logic for a program that calculates service charges for hazel's housecleaning service. the program contains housekeeping, detail loop, and end-of-job modules. the main program declares any needed global variables and constants and calls the other modules. the housekeeping module displays a prompt for and accepts a customer's last name. while the user does not enter for the name, the detail loop accepts the number of bathrooms and the number of other rooms to be cleaned. the service charge is computed as $40 plus $15 for each bathroom and $10 for each of the other rooms. the detail loop also displays the service charge and then prompts the user for the next customer's name. the end-of-job module, which executes after the user enters the sentinel value for the name, displays a message that indicates the program is complete.
Answers: 2
image
Computers and Technology, 22.06.2019 00:00, amyeileen
11. is the ability to understand how another person is feeling. a. authority b. sympathy c. empathy d. taking a stand
Answers: 1
image
Computers and Technology, 22.06.2019 11:00, Yamari000
What are two of the most common reasons that peolpe who need mental health care do not access it?
Answers: 1
image
Computers and Technology, 23.06.2019 15:30, Dweath50
The processing of data in a computer involves the interplay between its various hardware components.
Answers: 1
You know the right answer?
Consider the following schema: suppliers (sid: integer, sname: string, street: string, city: str...

Questions in other subjects: