DBMS - Unnamed PL/SQL code block: Use of Control structure and Exception handling is mandatory
DBMS Assignment 5
Unnamed PL/SQL code block: Use of Control structure and Exception handling is mandatory
Write a PL/SQL block of code for the following requirements:-
Schema:
1. Borrower(Rollin, Name, DateofIssue, NameofBook, Status)
2. Fine(Roll_no,Date,Amt)
• Accept roll_no & name of book from user.
• Check the number of days (from date of issue), if days are between 15 to 30 then fine amount will be Rs 5 per day.
• If no. of days>30, per day fine will be Rs 50 per day & for days less than 30, Rs. 5 per day.
• After submitting the book, status will change from I to R.
• If condition of fine is true, then details will be stored into fine table.
Post a Comment