Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the following relational database schema for BRACU Library Management System. [Underlined attributes are primary keys and foreign keys are mentioned separately] Books(Book ISBN, Copy
Consider the following relational database schema for BRACU Library Management System. [Underlined attributes are primary keys and foreign keys are mentioned separately] Books(Book ISBN, Copy number Book_title, Number_of_pages, Author_ID, Publisher_ID, Edition) [Foreign keys: Author_ID , Publisher_ID] Author(Author ID, Author_name, Author_biography) Publisher(Publisher ID. Publisher_name, address, phone) Students(Student ID. Student_name, Department, Phone) Book_Borrow_Record(Student ID Book ISBN, Copy number, date_borrowed, date_returned, late_fees) Foreign keys: Student_ID Book_ISBN Copy_number] Write appropriate SQL statements for the following: a. Show all the Author_ID, name and the total number of books written by each Author. Note that multiple copies of the same book should only be counted once b. Retrieve the Student id and book ISBN of books borrowed with the highest late_fees. C. Retrieve the id, name and phone number of all students and the date_borrowed of book who have not returned the book yet, sorted by date the book was borrowed (by default date_returned is null until book is returned)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started