Database Management System Lab
1. Create a table STUDENT with the following fields: RollNo, Name, DOB, Department,
Marks.
a. Insert at least 5 records
b. Display all records
c. Update marks for a specific student
d. Delete a student record
2. Create a table COURSE with CourseID, CourseName, Credits.
a. Alter the table to add a field Department
b. Drop the field Credits
3. Create two tables EMPLOYEE1 and EMPLOYEE2 with the following attributes:
(FNAME, MNAME, LNAME, SSN, BDATE, ADDRESS, SEX, SALARY,
SUPERSSN, DNO). Perform UNION, INTERSECT, and MINUS operations on them.
4. Use the STUDENT table to perform Aggregate functions and Scalar functions.
5. Using the STUDENT and COURSE tables,
a. Find students who scored above average marks using a subquery.
b. List students enrolled in ‘Computer Science’ using a subquery.
6. Create DEPARTMENT and STUDENT tables.
a. Write queries to display student names along with their department names using
JOIN operations.
7. Create a view to show student names and marks from the STUDENT table where Marks
> 75.
a. Query the view and update the view.
8. Write a PL/SQL block to accept a number and check if it is even or odd.
9. Write a PL/SQL program to divide two numbers and handle the exception if the
denominator is zero.
10. Use a parameterized cursor to display students based on department input.
11. Create a stored function to calculate grade based on marks:
a. Above 80: Distinction
b. 60–79: First Class
c. 40–59: Second Class
d. Below 40: Fail
12. Write a stored procedure to update the marks of a student given their RollNo and new
marks.