ITEC 3335: Database Development Assignment # 4: Due Date: 4
ITEC 3335: Database Development Assignment # 4: Due Date: 4
Assignment # 4
Due Date: 4th November 2020 Points: 100
You need to write SQL for all the following problems. After writing SQL, use SQLite, or any other SQL
of your choice (ORACLE, MS SQL, or MYSQL database server) to implement the database (DDL).
1) Implement the above database BookManagement using DDL query. [50 pts]
• You have to provide DDL query and create all seven tables.
• Properly declare all keys, attributes, and domain of not null.
• Insert atleast five (5) tuples for each of the tables and provide Insert into statements.
• All DDL queries needs to be written as well as typed in SQLite.
2) By following the above schema, give SQL for the following problems: [50 pts]
a) Find the book-id, title, and author name for all the books published from Pearson publication.
b) Find all books which includes the substring in the title “Halloween” and priced below $10.
Order it by book price.
c) Find the name and phone number of all the borrowers who have taken a book from all the
branches of the library.
d) For each library branch, retrieve the branch name and a total number of books from that
branch. Finally order it by rhe branch name.
e) Find the name and address of only those borrowers who live in Clear Lake and borrowed
more than 5 books.
f) How many copies of the book titled The Database System are owned by the library branch
named “Katy”?
g) Consider UHCL bookstore is currently running a 25% discount. Update price by reducing
25% to only those books which are published from UHCL publication.
h) Delete only those books which are published before year the 1950. Also devete the relevant
information from the Book-author and Book-copies table.
i) Find the name and address of the library branch which has the highest number of copies of
books.
j) Create a view named as Book-borrower which includes all the books along with borrowers.
General Guideline
• This is an individual assignment and should be completed only by you. Any form of unfair means
will result in severe punishment.
• You need to submit the assignment on or before the due date to avoid 10% penalty per day.
• After the late submission date (5 days from original due date), you are not allowed to submit the
assignment under any circumstances.