Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following relation schemas. The primary keys are underlined. All attributes are of type string if not indicated otherwise. Use multi-step and multi-line queries

Consider the following relation schemas. The primary keys are underlined. All attributes are of type string if not indicated otherwise. Use multi-step and multi-line queries to ease the formulation of queries. Use the rename operator to give intermediate query results a name (some textbooks use the equivalent notation). Aggregate functions as you can find them defined in some textbooks are not allowed, neither in homework assignments nor in exams. [Note: If the location of your answer for a question is not correctly specified in Gradescope, one point will be deducted.]

Customers(cID, name, city, state)

Orders(oID, cID, orderdate, totalcost:integer)

Products(pID, name, category, price:integer)

SellerProducts(sID, pID)

OrderDetails(oID, pID, discount:integer, sID)

Sellers(sID, name, storeName, city)

(a) [5 points] Find the names of sellers and the names of the products they sell that have not been sold yet. Display the sellers names and the names of the products together.

(b) [5 points] Find the names of customers who have ordered an iPad (unique product name) more than once.

(c) [5 points] Find the names of sellers and their store names that have offered the highest discount on the product iPad (unique product name).

(d) [5 points] Find the names of customers who live in Gainesville and have only purchased products from the category named computer accessory.

In relational algebra only

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Reliability Engineering Designing And Operating Resilient Database Systems

Authors: Laine Campbell, Charity Majors

1st Edition

978-1491925942

More Books

Students also viewed these Databases questions

Question

What is homeowners insurance? How are the premiums normally paid?

Answered: 1 week ago

Question

=+Have you been arrested?

Answered: 1 week ago

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago