Assignment2 DBMS
Assignment2 DBMS
student(id, name)
enrolledIn(id, code)
subject(code, lecturer,dept)
Employee (empno,name,office,age)
Books(isbn,title,authors,publisher)
Loan(empno,isbn,date,amount)
a) Find the name of employees who have borrowed a book published by XYZ
Ltd.
b) Display the maximum number of books published publisher.
c) Find the name of employees who have borrowed more than 5 books published
by XYZ Ltd.
d) For each Publisher, find the names of employees who have borrowed more
than five books of that publisher.
e) Fetch the loan amount of employee dated today.
3. Consider the following schema:
Person ( name, age, gender )
Frequents ( name, pizzeria )
Eats ( name, pizza )
Serves ( pizzeria, pizza, price )
a) Find all pizzerias frequented by at least one person under the age of 18.
b) Find the names of all females who eat either mushroom or pepperoni pizza (or
both).
c) Find the names of all females who eat both mushroom and pepperoni pizza.
d) Find all pizzerias that serve at least one pizza that Amy eats for less than
$10.00.
e) For each person, find all pizzas the person eats that are not served by any
pizzeria the person frequents. Return all such person (name) / pizza pairs.