Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Suppose that we have the following database schema: Book(BId, title, PName, AId) PName foreign key referencing Publisher, Aid foreign key referencing Author Author(AId, Name) Publisher(PName,

Suppose that we have the following database schema:

Book(BId, title, PName, AId) PName foreign key referencing Publisher, Aid foreign key referencing Author

Author(AId, Name)

Publisher(PName, Address, Phone)

BookLoan(BId, CardNo, DateOut, DueDate) BId foreign key referencing Book, CardNo foreign key referencing Borrower

Borrower(CardNo, Name, Address, Phone)

1- Write down the following queries in SQL:

a. Retrieve the book title and the number of its copies.

b. Retrieve the title and the due date of the book borrowed by Mshari.

c. Retrieve the number of books titled Network borrowed by Mshari

d. Give the number of borrowers who borrowed database book more than 3 times

Rewrite the queries in relational algebra language

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

Professional SQL Server 2000 Database Design

Authors: Louis Davidson

1st Edition

1861004761, 978-1861004765

More Books

Students also viewed these Databases questions

Question

=+ Are there additional forms of employee representation?

Answered: 1 week ago

Question

=+What is the nature of their impact?

Answered: 1 week ago