Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given the e - commercial database schema shown below, write the following queries in ( 1 ) relational algebra and ( 2 ) SQL .

Given the e-commercial database schema shown below, write the following queries in (1) relational algebra and (2) SQL. State your assumptions if the semantics are not clear.
item(iid, iname, price, category, rating, month, year)
customer(cid, cname, cstreet, ccity)
buy(transID, cid, iid, year, month, day)
advertise(cid,iid)
(a) Find customers who have only bought items with a rating greater than 3.(12)
(b) Find customers who have bought an item that was advertised to them. (12)
(c) Find customers who bought two of the same items in the same month.

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 Application Development And Design

Authors: Michael V. Mannino

1st Edition

0072463678, 978-0072463675

More Books

Students also viewed these Databases questions