DBMS 9 10 11-1
DBMS 9 10 11-1
DBMS 9 10 11-1
PRACTICAL 8
AIM:Write a PL/SQL program to demonstrate Cursors
DECLARE
emp_id employees.employee_id%TYPE;
emp_name employees.first_name%TYPE;
emp_salary employees.salary%TYPE;
-- Declare a cursor
CURSOR emp_cursor IS
FROM employees
BEGIN
OPEN emp_cursor;
LOOP
suhail (22964)
DATABASE MANAGEMENT SYSTEM
DBMS_OUTPUT.PUT_LINE('------------------------');
END LOOP;
CLOSE emp_cursor;
END;
OUTPUT
SUBMITTED BY TEACHER
SIGN
suhail (22964)
DATABASE MANAGEMENT SYSTEM
Practical 9
AIM:Write a PL/SQL program to demonstrate Packages.
PL/SQL program that demonstrates the usage of packages. In this example, we'll
create a package with two procedures to calculate the area and circumference of
a circle.
-- Declaration of constants
-- Declaration of procedures
END;
-- Implementation of procedures
area NUMBER;
BEGIN
END;
circumference NUMBER;
SUBMITTED BY TEACHER
SIGN
suhail (22964)
BEGIN
circumference := 2 * pi * radius;
END;
END;
OUTPUT
SUBMITTED BY TEACHER
SIGN
suhail (22964)
DATABASE MANAGEMENT SYSTEM
PRACTICAL 10
AIM:Write PL/SQL queries to create Procedures
DECLARE
emp_name VARCHAR2(100);
emp_salary NUMBER;
BEGIN
END;
SUBMITTED BY TEACHER
SIGN
suhail (22964)
PRACTICAL 11
AIM:Write PL/SQL queries to create Triggers.
DECLARE
sal_diff NUMBER;
BEGIN
END;
output
SUBMITTED BY TEACHER
SIGN
suhail (22964)
PRACTICAL-12
AIM: Draw an ER Diagram for inventory management system.
a) Mention all required entities and their attributes
b) Mention all key constraints
c) Mention all relationship in the diagram
SUBMITTED BY TEACHER
SIGN
suhail (22964)
DATABASE MANAGEMENT SYSTEM
PRACTICAL-13
AIM: Draw an ER Diagram for flight reservation system.
a) Mention all required entities and their attributes
b) Mention all key constraints
c) Mention all relationship in the diagram
SUBMITTED BY TEACHER
SIGN
suhail (22964