Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Over a relation Borrow ( reader , book,date ) , consider the following SQL expression: select date from Borrow except select date from Borrow where

Over a relation Borrow(reader,book,date), consider the following SQL expression:
select date from Borrow
except
select date from Borrow where reader='Ali'
Which statements are correct? (In relational algebra we use project to indicate projections and sigma to indicate selections.)
An equivalent SQL expression is the following:
select date from Borrow where reader <> 'Ali'
The expression returns all dates when a book was borrowed by someone else than Ali.
The expression returns all dates when the only reader who borrowed something was Ali.
The following relational algebra expression is NOT equivalent:
project[date](Borrow minus sigma[author='Ali'](Borrow))
We can write the same query in relational algebra as follows:
project[B1.date]
sigma[B1.reader <> 'Ali']
sigma[B1.date=B2.date]
(rename[B1](Borrow) cart-prod rename[B2](Borrow)
The expression returns all dates when Ali did not borrow a book.

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

Authors: Michael V. Mannino

3rd Edition

0071107010, 978-0071107013

More Books

Students also viewed these Databases questions

Question

How many three-digit numbers are divisible by 7?

Answered: 1 week ago

Question

What is Indian Polity and Governance ?

Answered: 1 week ago

Question

b. Does senior management trust the team?

Answered: 1 week ago

Question

c. How is trust demonstrated?

Answered: 1 week ago

Question

Have issues been prioritized?

Answered: 1 week ago