Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider three tables defined as follows: Product(prod-id,description,category,unit-price) Customer(cust-id,address,limit-of-credit) Orders(prod-id,cust-id,order-date,number-ordered) These tables describe the operation of a wholesale supplier of products who satisfies orders placed by

Consider three tables defined as follows:

Product(prod-id,description,category,unit-price)

Customer(cust-id,address,limit-of-credit)

Orders(prod-id,cust-id,order-date,number-ordered)

These tables describe the operation of a wholesale supplier of products who satisfies orders placed by customers. Write relational algebra expressions to answer the following queries and use Join (), Selection (), Projection (), Union (), Intersection () is Rename (), Assignment (), and Subscripts in the expressions.

(a) Find the ids of products not ordered by any customer.

(b) Find the product-ids of all products for which there is at least one order costing less than $500. (The cost is the quantity times the unit price.)

(c) Show all attributes of orders for which satisfying that order alone would exceed the customer's credit limit.

(d) Find the categories of all products ordered on 1/1/2023.

(e) Find the ids of products that either cost less than $30, or have been ordered prior to 1/1/2021.

(f) Find pairs of customers who ordered the same product on the same date. (Do not include both a pair and its reverse.)

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_2

Step: 3

blur-text-image_3

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

Privacy In Statistical Databases International Conference Psd 2022 Paris France September 21 23 2022 Proceedings Lncs 13463

Authors: Josep Domingo-Ferrer ,Maryline Laurent

1st Edition

3031139445, 978-3031139444

More Books

Students also viewed these Databases questions

Question

What is the business model and opportunity in virtual influencers?

Answered: 1 week ago

Question

Persuasive Speaking Organizing Patterns in Persuasive Speaking?

Answered: 1 week ago