0% found this document useful (0 votes)
125 views1 page

ITEC 3335: Database Development Assignment # 4: Due Date: 4

This document outlines Assignment #4 for the ITEC 3335: Database Development course. The assignment involves implementing a database for a book management system using SQL. Students are instructed to: 1) Create 7 tables using DDL queries to implement the book management database schema provided. They must include keys, attributes, data types and insert sample data. 2) Write SQL queries to retrieve information from the database as outlined in 9 problems, including finding books by publisher, titles containing strings, borrower information, branch statistics, borrower addresses and more. General guidelines specify this is individual work, the due date to avoid penalties, and that late submissions after 5 days will not be accepted.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
125 views1 page

ITEC 3335: Database Development Assignment # 4: Due Date: 4

This document outlines Assignment #4 for the ITEC 3335: Database Development course. The assignment involves implementing a database for a book management system using SQL. Students are instructed to: 1) Create 7 tables using DDL queries to implement the book management database schema provided. They must include keys, attributes, data types and insert sample data. 2) Write SQL queries to retrieve information from the database as outlined in 9 problems, including finding books by publisher, titles containing strings, borrower information, branch statistics, borrower addresses and more. General guidelines specify this is individual work, the due date to avoid penalties, and that late submissions after 5 days will not be accepted.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

ITEC 3335: Database Development

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).

Book (book-id, title, publisher-name, year, price)


Book-author (book-id, author-name)
Publisher (publisher-name, address, phone)
Book-copies (book-id, branch-id, no-of-copies)
Book-loans (book-id, branch-id, card-no, dueDate, dateOut)
Library-branch (branch-id, branch-name, address)
Borrower (card-no, name, address, phone)

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.

You might also like