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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 02:00, itsyagirl11076
What is the process in which the software development team compiles information to determine the final product.
Answers: 3
image
Computers and Technology, 22.06.2019 06:00, kamilahmcneil3969
What are the most likely causes of conflict at the meeting? check all that apply.
Answers: 1
image
Computers and Technology, 22.06.2019 20:00, ksanchez2100
Need asap assignment directions: think of an organization (business, religious institution, volunteer organization, sports team) with which you have been involved. imagine outfitting it with an it infrastructure. prepare a plan for what you would do to support outfitting it. draw a map of a network connecting all the individuals, give them pcs and printers, and lay out the design as best you can. the purpose is to begin working with these concepts, not to build a perfect network.
Answers: 2
image
Computers and Technology, 22.06.2019 22:00, noeminm105
Consider the following declarations (1, 2, 3, 5, 7)class bagtype{public: void set(string, double, double, double, double); void print() const; string getstyle() const; double getprice() const; void get(double, double, double, double); bagtype(); bagtype(string, double, double, double, double); private: string style: double l; double w; double h; double price; }; a.) write the definition of the number function set so that private members are set according to the parametersb.) write the definition of the member function print that prints the values of the data membersc.) write the definition of the default constructor of the class bagtype so that the private member variables are initialized to "", 0.0, 0.0, 0.0, 0.0, respectively d.) write a c++ statement that prints the value of the object newbag. e.) write a c++ statement that declares the object tempbag of type bagtype, and initialize the member variables of tempbag to "backpack", 15, 8, 20 and 49.99, respectively
Answers: 3
You know the right answer?
Consider the following schema: SUPPLIERS (SID: integer, SNAME: string, STREET: string, CITY: string...

Questions in other subjects:

Konu
English, 15.01.2021 23:10
Konu
Mathematics, 15.01.2021 23:10
Konu
Mathematics, 15.01.2021 23:10
Konu
Mathematics, 15.01.2021 23:10
Konu
Mathematics, 15.01.2021 23:10