This document outlines programming exercises for a Relational Database Management System lab. It includes instructions to write PL/SQL programs for a Fibonacci series, multiplication table, and prime numbers. It also provides directions to create an employee table, insert records, and write a program to calculate salary increments based on salary ranges. Additional exercises include using a cursor to calculate totals and averages for students, writing a procedure to calculate electricity bills, and creating triggers for a library booking system and employee table.
This document outlines programming exercises for a Relational Database Management System lab. It includes instructions to write PL/SQL programs for a Fibonacci series, multiplication table, and prime numbers. It also provides directions to create an employee table, insert records, and write a program to calculate salary increments based on salary ranges. Additional exercises include using a cursor to calculate totals and averages for students, writing a procedure to calculate electricity bills, and creating triggers for a library booking system and employee table.
This document outlines programming exercises for a Relational Database Management System lab. It includes instructions to write PL/SQL programs for a Fibonacci series, multiplication table, and prime numbers. It also provides directions to create an employee table, insert records, and write a program to calculate salary increments based on salary ranges. Additional exercises include using a cursor to calculate totals and averages for students, writing a procedure to calculate electricity bills, and creating triggers for a library booking system and employee table.
Virudhunagar Hindu Nadars’ Senthikumara Nadar College (Autonomous)
Accredited with ‘A’ Grade by NAAC
Virudhunagar – 626 001 * LOW COST ACCESS TO HIGH QUALITY EDUCATION * 53rd Rank at College Category in NIRF Ranking Department of Computer Applications I MCA – Relational Database Management System Lab
Program List Cursor
1. Write a PL/SQL program for Fibonacci series. 2. Write a PL/SQL program for Multiplication table. 3. Write a PL/SQL program to display the prime numbers between the given ranges.
4. Create a Table Empdetails containing Empno, Empname, Salary, Incsalary.
a. Insert the records to the above Table using PL/SQL Program. b) Write a PL/SQL program for the following.
Salary Increment
< Rs.6000 20% of Salary
>Rs.6001 & < Rs.10000 10% of Salary >Rs.10001 & < Rs.30000 5 % of Salary >Rs.30001 Nil
Accept the employee number from user.
Salary Increment amount must store in the table.
1. Cursor
Create a Table Student which contains the following Details.
Register Number (Primary Key), Student Name, DBMS, SE, ORACLE, Python & City Name.
Write a PL/SQL cursor program to perform following operations.
Calculate total & average for each student.
2. Procedures
. Create a Table Electricity Bill which contains the following columns.
Consumer Number, Name, Type (‘H’, ‘O’, ‘F’) , Reading.
Subscribers Amount (towards unit charge)
House Rs.2.00 Office Rs.3.00 Factory Rs.5.00
Write a procedure to calculate the EB Bill.
Accept consumer number & Current reading from the user. 3. Triggers
a) Create a Table Library which contains the following Columns.
Date, Student Name, Roll No
Create the Trigger for the following.
BCA Students can take books on Monday.
BCA Students can take books on Wednesday. PGDCA Students can take books on Friday. b) Create a Table employee which contains the following Columns :
Employee Name, Employee Number, Salary.
When Updating Salary is less, then the trigger fires. When Deleting a employee number less than 1000, then the trigger fires