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

Database Management System Lab Exercises

The document outlines a lab assignment for a Database Management System, detailing tasks such as creating and manipulating tables for STUDENT and COURSE, performing SQL operations like UNION and JOIN, and implementing PL/SQL blocks for various functionalities. It includes requirements for inserting, updating, and deleting records, as well as using aggregate functions and creating views. Additionally, it specifies the creation of stored functions and procedures for calculating grades and updating student marks.

Uploaded by

sajida17.ss
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)
12 views1 page

Database Management System Lab Exercises

The document outlines a lab assignment for a Database Management System, detailing tasks such as creating and manipulating tables for STUDENT and COURSE, performing SQL operations like UNION and JOIN, and implementing PL/SQL blocks for various functionalities. It includes requirements for inserting, updating, and deleting records, as well as using aggregate functions and creating views. Additionally, it specifies the creation of stored functions and procedures for calculating grades and updating student marks.

Uploaded by

sajida17.ss
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

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.

You might also like