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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:00
Which of the following statements tests if students have a grade of 70 or above, as well as fewer than five absences? a: if(grade > = 70 and daysabsent < = 5): b: if(grade > = 70 or daysabsent < = 5): c: if(grade > 70 and daysabsent < = 5): d: if(grade > 70 or daysabsent < = 5): i took the test the answer is a
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
What is outfitting a workplace with video in a technology
Answers: 2
question
Computers and Technology, 23.06.2019 02:30
How to launch an app: steps to be successful? launching an app is a great idea, but it’s not that easy as we supposed to think. the majority of mobile applications don’t generate revenue because companies aren’t ready to be competitive. referring to our experience in successfully building and launching apps we hope to you omit these difficulties. we are going to talk about ideas, marketing, testing your product, its development, distribution and support. you will learn 8 product launch stages to succeed.
Answers: 1
question
Computers and Technology, 23.06.2019 09:20
How to print: number is equal to: 1 and it is odd number number is equal to: 2 and it is even number number is equal to: 3 and it is odd number number is equal to: 4 and it is even number in the console using java using 1 if statement, 1 while loop, 1 else loop also using % to check odds and evens
Answers: 3
You know the right answer?
Consider the following schema: suppliers (sid: integer, sname: string, street: string, city: str...
Questions