You are on page 1of 2

Faculty of Information Science, UCSY

Paper No: IS-201


Fundamental Database Management System

The scope of this assignment is chapter 3, Database System Concepts.

Roll Number : YKPT-

Question 1. In a given library database, write the following queries in SQL.


Member (member_id, name)
Book (isbn, title, authors, publisher)
Borrowed (member_id, isbn, date)

a. Create table, add the appropriate data type and values.


Answer:

b. Find the member number and name of each member who has borrowed at least one
book published by “McGraw-Hill”.
Answer:

c. Find the member number and name of each member who has borrowed every book
published by “McGraw-Hill”.
Answer:

d. For each publisher, find the member number and name of each member who has
borrowed more than five books of that publisher.
Answer:

e. Find the average number of books borrowed per member. Take into account that if a
member does not borrow any books, then that member does not appear in the
borrowed relation at all, but that member still counts in the average.
Answer:
Remark:
1) Fill your roll number on the top-right corner of this sheet.
2) Write down your answer on this sheet and submit to moodle assignment test.
3) Submission dead line is 22.2.2024 (Monday).
4) This is individual assignment, so, write your own answer. The copied answer will be
rejected.

You might also like