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

Lab 8 - Implementation in MySQL-Oracle 2

The lab aims to familiarize students with MySQL/Oracle Database Management Systems by designing a Library Management System. Key tasks include updating book records, searching by author or title, maintaining loan records, and listing overdue books with fines. Students are required to define a schema, implement it in SQL, and enforce specific constraints on the data.

Uploaded by

plutoagcorp
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)
0 views1 page

Lab 8 - Implementation in MySQL-Oracle 2

The lab aims to familiarize students with MySQL/Oracle Database Management Systems by designing a Library Management System. Key tasks include updating book records, searching by author or title, maintaining loan records, and listing overdue books with fines. Students are required to define a schema, implement it in SQL, and enforce specific constraints on the data.

Uploaded by

plutoagcorp
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

Department of Computer Science

CS262 Database Concepts

Lab 8 – Implementation Using MySQL/Oracle 2

Aim
______________________________________________________________________________
The aim of this lab is to familiarise you with the MySQL/Oracle Database Management System,
enabling you to define relations and constraints and populate a database.

Your Tasks
______________________________________________________________________________

You overall task will be to design an end-to-end Library Management System which performs the
following tasks:

A. Updates new books into the database.


B. Searches any given room based on author name or title.
C. Maintains an entry into the database for every book issued with the return date.
D. On any given date lists all the books along with their issuers, which must be returned.
E. List any overdue books and fines.

The logical model is as follows (data types/domains not specified):

Borrower (borrower_id, first_name, last_name, email, phone, address)


Author (author_id, first_name, last_name, email, phone, address)
Book (book_id, title, edition, year, price, isbn, pages, aisle, description)
Copy (book_id, copy_id, status)
Author_list (author_id, book_id, role)
Loan (borrower_id, book_id, copy_id, loan_date, return_date)

a) Determine and rewrite the above schema with the correct domain/ data type for each attribute.

b) Using SQL create the above relations in MySQL/Oracle. Include the following constraints.
Note the queries you used to specify the constraints.

i. Loan date must not be greater than return date.


ii. Price in Book must be between P100 and P1000.
iii. Copy Status can only be ‘available’, ‘borrowed’ or ‘reserved’.
iv. Loan date must not be greater than today’s date.

c) Enter data into the relations to check the above constraints.

You might also like