Question: DATABASE: library ( library _ name [ pk ] , City, Phone, manager _ SSN [ pk , fk ] ) book ( book _
DATABASE:
library librarynamepk City, Phone, managerSSNpkfk
book booknamepk Genre, Country
borrower SSNpk Name, Birthyear, Favbookfk Gender
likes SSNpkfk bookpkfk
bookLoans libraryfk booksfk
manager SSNpk Name, City, Address, Phone
For this database, all the tables are created and populated in a dumpbackup file that you
can download from here. You need to import the dumpbackup file to your MySQL as a
new database instructions on how to import a dump file can be found at the end part in
Appendix A and then perform the following queries:
List name, gender, and age of all borrowers. The age of borrower column should
be named as age in the output.
List name, gender, and age of all female borrowers older than years. The age
of those female borrower column should be named as age in the output.
List the name, phone, and address of all managers that have the word Martial
anywhere in their address.
List the Name of borrowers who declared the book they like. Even if a borrower
likes several books, hisher name must appear just once
List library name, manager name of that library, and phone number where phone
number is recorded both for the library and the manager phone you cannot use
JOIN for this question. Use subquery
List the name and ssn of all borrowers who like their favorite book. you cannot use
JOIN for this question. Use subquery
List the name and gender of all borrowers who DO NOT like their favorite book.
you cannot use JOIN for this question. Use subquery
List the name of libraries that loan book genre science fiction
List of managers who live in the same city that Robinson Baumbachname of
one of the managers lives.
List the book names loaned by at least one library and liked by at least one
borrower.
List the name and phone number of all managers who do not have The Little
Prince in their libraries. The Little Prince is a book name
List Name of the borrowers who like the same book. The list should be in form of
pairs of Names. That is the Names of two persons who like the same book.
Find total number of libraries that have The Lord of the Rings
Find the total number of books that are liked by borrowers. Note that if a book is
repeatedly liked by several people, it is just counted as once.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
