Integrated MCA (SEM-II/IV)
Course Code 150120302
Category Multidisciplinary Course (MDC)
Course Title Database Management Systems II (DBMS II PLSQL)
Scheme and Credits Theory Tutorial Lab Credits
0 0 4 2
Pre-requisites (if Basic knowledge of SQL
any)
Detailed Schedule
Day - 1 (Unit –1)
(Advanced SQL : Top-n Query, Correlated Queries, Sub query ,Oracle Database Overview
,Link Server (MS SQL) Overview)
Essential List (Practical)
1 Creating Table with Data Constraints:
Viewing data in the tables: (Select Statement and where condition)
Filtering Data from the table
Sorting Data in the Table: (Order By, Desc clause)
Creating a Table from a Table
Inserting Data into a Table from Another Table
Deleting records from the table:
Using Delete and Truncate operations Destroying Table
2 CUST (custno, custname, addln1, addln2, city, state, phone)
ITEM (itemno, itemname, itemprice, qty_on_hand)
INVOICE (invno, invDate, custno)
INV_ITEM (invno, itemno, qty_used)
Desirable List (Practical):
1 1. Create DEPT and EMP Table
2. Display the structure of an EMP table
3. Display the structure of DEPT table
4. Insert minimum 10 records into EMP Table
5. Insert minimum 10 records into DEPT Table
Day - 2 (Unit –1)
(Advanced SQL : Top-n Query, Correlated Queries, Sub query ,Oracle Database Overview
www.ljku.edu.in July-Dec2024
,Link Server (MS SQL) Overview)
Essential List (Practical)
1 1. Create the above four tables along with key constraints. 2. Write an Insert script for
insertion of rows with substitution variables 3. Insert appropriate data
2 Add a column – “color” to the Item table.
1. Display the column Item name and Price in sentence form using Concatenation.
Desirable List (Practical):
1 . Display all the records of EMP table
Display all the records of DEPT table
Display only Name of all employees
Display Employee’s Name and salary
Display only unique departments (deptno) from EMP table
Day - 3(Unit –1)
(Advanced SQL : Top-n Query, Correlated Queries, Sub query ,Oracle Database Overview
,Link Server (MS SQL) Overview)
Essential List (Practical)
1. Create the above four tables along with key constraints. 2. Write an Insert script for insertion of
rows with substitution variables 3. Insert appropriate data
Add a column – “color” to the Item table.
1. Display the column Item name and Price in sentence form using Concatenation.
Desirable List (Practical):
. Display all the records of EMP table
Display all the records of DEPT table
Display only Name of all employees
Display Employee’s Name and salary
Display only unique departments (deptno) from EMP table
Day - 4(Unit –1)
(Advanced SQL : Top-n Query, Correlated Queries, Sub query ,Oracle Database Overview
,Link Server (MS SQL) Overview)
Essential List (Practical)
Desirable List (Practical):
. Display all the records of EMP table
Display all the records of DEPT table
www.ljku.edu.in July-Dec2024
Display only Name of all employees
Display Employee’s Name and salary
Display only unique departments (deptno) from EMP table
Day - 5 (Unit –2)
(Transaction Management)
Essential List (Practical/Theory)
1 What is Transaction/ Explain the ACID properties of transactions.
2 What are the different states of transaction?
Desirable List (Practical/Theory):
1 How transaction can be in consistent state? Explain.
2 Briefly explain durability of transaction.
Day - 6 (Unit –2)
(Transaction Management)
Essential List (Practical/ Theory)
1 What is concurrency? Explain it with suitable example.
Desirable List (Practical/Theory):
1 Explain conflict serializability and view serializability
Day - 7 (Unit –2)
(Transaction Management)
Essential List (Practical /Theory)
1 Explain serializabilty and Recoverability with appropriate example
Desirable List (Practical):
1 Explain recoverability of schedules.
Day - 8 (Unit –2)
(Transaction Management)
Essential List (Practical)
1 Explain Lock based protocol.
Desirable List (Practical):
1 What are the different types of Locks?
Day - 9 (Unit –2)
(Transaction Management)
www.ljku.edu.in July-Dec2024
Essential List (Practical)
1 Explain time stamp based protocol.
Desirable List (Practical):
1 What are the disadvantages of concurrency control? Why Concurrency control Is needed?
Day - 10(Unit –2)
(Transaction Management)
Essential List (Practical)
1 Explain Concurrency control Problem
Desirable List (Practical):
1 Explain concurrency control with time stamping method
Day - 11 (Unit –2)
(Transaction Management)
Essential List (Practical)
1 How do we maintain the concurrency of the database? What is concurrent Execution in DBMS? Sr.
No Desirable List (Practical
Desirable List (Practical):
1 Explain concurrency control with time stamping method.
Day - 12 (Unit –3)
(Basics Of PLSQL)
Essential List (Practical)
1 Use Following Tables and solve given queries:
Employee (Eid,EName,Department,Job,Salary)
Write a pl/sql block to print the name and job of an employee who is working as ‘clerk’ earning
salary of Rs 1700.
Desirable List (Practical):
1 Using above table Solve following queries.
1. Write a pl/sql block to display all employees’ name and salary whose salary is more than 2000.
Day - 13(Unit –3)
(Basics Of PLSQL)
Essential List (Practical)
1 Write a pl/sql block to print the total number of employees working as ‘manager’ in previously
done query.
www.ljku.edu.in July-Dec2024
Desirable List (Practical):
1 Using above table Solve following queries.
1. 2. Write a pl/sql block to display all employee whose name start with ‘j’.
Day – 14(Unit –3)
(Basics Of PLSQL)
Essential List (Practical)
1 Write a pl/sql block to print the total number of employees working as ‘manager’ in previously
done query.
Desirable List (Practical):
1 Using above table Solve following queries.
1. Write a pl/sql block to display all employee whose name start with ‘j’.
Day - 15(Unit –3)
(Basics Of PLSQL)
Essential List (Practical)
1 Write a pl/sql block to print total salary of employees from the employee table.
Desirable List (Practical):
1 Using above table Solve following queries.
1. Write a pl/sql block to display all employees who are not in department number (deptno) 20.
Day - 16(Unit –3)
(Basics Of PLSQL)
Essential List (Practical)
1 Write a pl/sql block to retrieves the details of an employees when the user is prompted to enter
employee number
Desirable List (Practical):
1 Write a PL/SQL block using CASE statement to accept the owner name from the user. The user
name can be SYS, SYSTEM, HR or SCOTT. If the owner name is SYS then print the result is ‘The
Owner is SYS’. If the owner name is SYSTEM then print the result is ‘The Owner is SYSTEM’. If the
owner name is HR then print the result is ‘The Owner is HR’. If the owner name is SCOTT then
print the result is ‘The Owners SCOTT’. Otherwise print ‘Invalid Choice
Day - 17(Unit –3)
(Basics Of PLSQL)
Essential List (Practical)
1 Write a pl/sql block to retrieves the details of an employee when the user is prompted to enter
the job_title
Day - 18(Unit –3)
(Basics Of PLSQL)
Essential List (Practical)
www.ljku.edu.in July-Dec2024
1 Write a pl/sql block to retrieves the salary using the value the user is prompted to enter. The user
is prompted to enter job_title. Then block test as to whether the job retrieved is an Analyst or
Manager or Clerk. For an Analyst, the salary has been increased by 5.5%, a Manager will have a
salary increased by 5%, whereas the salary of the Clerk will increase by 7.5% and the rest of the
employees will have salary increase of 8%
Day - 19(Unit –3)
(Basics Of PLSQL)
Essential List (Practical)
1 Write a pl/sql block to read the salary of an employee 10 and display the appropriate message if
it lies in the range of 1000 and 3000
Desirable List (Practical):
1 Write a pl/sql block to get the details of marks (rollno, mark1, mark2, and grade) out of 100 for
marks1 and marks2 respectively. Display the grade in table marks using if statements as specified
below if stud_percent > 70 then grade is ‘A’,if stud_percent>60 and 70 then grade is ‘B’ else give
grade is ‘C’.
Day - 20(Unit –3)
(Basics Of PLSQL)
Essential List (Practical)
1 Write a pl/sql block to update the salary of the employees with 1000 when total number of
employees in a particular department is greater than 3
Day - 21(Unit –3)
(Basics Of PLSQL)
Essential List (Practical)
1 Write a pl/sql block to accept job from Employee table. Give the following raise in the salary.
By 9% ,if job is clerk
By 8% ,if job is manager
By 7%, if job is Salesman.
Update the salary of the Employee table
Day - 22(Unit –3)
(Basics Of PLSQL)
Essential List (Practical)
1 Use following tables and write below given PL/SQL blocks.
PRODUCTS (Prod_ID, Prod_Name, Supplier_ID, Cat_ID, Unit, Price)
ORDER_DETAILS (OrderDetail_ID, Order_ID, Prod_Id, Quantity)
i. Write a PLSQL block to display total number of products ordered in Order_ID = 3
ii. Write a PLSQL block to update the price (actual price + 5) of product with Id = 2
Day - 23(Unit –3)
(Basics Of PLSQL)
www.ljku.edu.in July-Dec2024
Essential List (Practical)
1 Use following tables and write below given PL/SQL blocks.
PRODUCTS (Prod_ID, Prod_Name, Supplier_ID, Cat_ID, Unit, Price)
ORDER_DETAILS (OrderDetail_ID, Order_ID, Prod_Id, Quantity)
iii. Write a PLSQL block to delete the products of Cat_Id = 3
iv. Write a PLSQL block to insert any product whose cat_id = 3
v. Write a PLSQL block to display Supplier_Id and their total number of products they
supply.
Day - 24(Unit –3)
(Basics Of PLSQL)
Essential List (Practical)
1 Use following tables and write below given PL/SQL blocks.
PRODUCTS (Prod_ID, Prod_Name, Supplier_ID, Cat_ID, Unit, Price)
ORDER_DETAILS (OrderDetail_ID, Order_ID, Prod_Id, Quantity)
i. Write a pl/sql block to add record twice in database using basic loop and while loop.
Day - 25(Unit –3)
(Basics Of PLSQL)
Essential List (Practical)
1 Create a pl/sql block to create a record type as it is well-known, of all employees who earns more
than 1700 by prompting the user to enter employee no, then a block will test if the employees
earns that salary before displaying details. The record must store the employee’s
number,job,salary and annual salary
Desirable List (Practical):
1 Write a pl/sql block to add record twice in database using for loop.
Day - 26(Unit –4)
( PLSQL Advanced)
Essential List (Practical)
1 Write PL/SQL block to increase the salary by 15 %( Rs. 1000) for all Employees in emp table.
(Use Cursor)
Day - 27(Unit –4)
( PLSQL Advanced)
Essential List (Practical)
1 Write a PL/SQL block to increase the salary by 10% Rs. 6000) of the Employee whose
Job=’Accounting’ and display the count total number of employees whose job=’Accounting (Use
Cursor)
Day - 28(Unit –4)
( PLSQL Advanced)
www.ljku.edu.in July-Dec2024
Essential List (Practical)
1 Write a PL/SQL block, which takes as input the department name and displays all these
employees of this department who have been working since 2010. (Use Cursor)
Desirable List (Practical (Practical)
1 Write a PL/SQL Cursor to take a employee’s name as an input from the user and prepare a report
in the following format: and Give appropriate message if employee Not found.
***********************************************************
EMPNO EMP_NAME JOB SALARY ************************************************************
Grand Total:
Day - 29(Unit –4)
( PLSQL Advanced)
Essential List (Practical)
1 Create table:
EmployeeInformation: (Emp_No. , Emp_Name , Emp_Dept. , Emp_Salary)
In employee information table update the employee name 'AADITYA' department 'Program
Developer' changes to 'Web Developer' using implicit cursor.
Day - 30(Unit –4)
( PLSQL Advanced)
Essential List (Practical)
1 Create table:
EmployeeInformation: (Emp_No. , Emp_Name , Emp_Dept. , Emp_Salary)
In employee information table write PLSQL block to retrieve the details of those employee whose
salary is more than 20000 using explicit cursor.
Desirable List (Practical (Practical)
1 Using explicit cursor retrieves the records of first 5 employees one by one from employee
information table.
Day - 31(Unit –4)
( PLSQL Advanced)
Essential List (Practical)
1 Create table:
EmployeeInformation: (Emp_No. , Emp_Name , Emp_Dept. , Emp_Salary)
Display employee number wise first two employee details using for loop cursor.
Day - 32(Unit –4)
( PLSQL Advanced)
www.ljku.edu.in July-Dec2024
Essential List (Practical)
1 Create table:
EmployeeInformation: (Emp_No. , Emp_Name , Emp_Dept. , Emp_Salary)
Display employee information from emp_information table whose emp_no four (4) using
parameterized cursor.
Desirable List (Practical)
1 Using Explicit Cursor to display the top five highest paid workers who are specialized in
‘POLISHING’.
Wroker(WrokerId,Name,Wage_Per_Hour,Specialized_In,)
Day - 33(Unit –4)
( PLSQL Advanced)
Essential List (Practical)
1 Write PL/SQL block to increase the salary by 15 %( Rs. 1000) for all Employees in emp table.
Raise a user defined exception if an employee is not found.
Day - 34(Unit –4)
( PLSQL Advanced)
Essential List (Practical)
1 Write a PL/SQL block to increase the salary by 10 %( Rs. 6000) of the Employee whose
Job=’Accounting’ and display the count total number of employees whose job=’Accounting.
Raise and exception for Job title
Desirable List (Practical)
1 Write a user defined exception for program where if student’s marks are less than 0 then
appropriate error message must be shown as exception.
Write a PLSQL block to find the largest of three numbers
Day - 35(Unit –5)
(PL/SQL Database Objects and Triggers)
Essential List (Practical)
1 Create a procedure to display the employee name whose employeeno is accepted by the user.
Day - 36(Unit –5)
(PL/SQL Database Objects and Triggers)
Essential List (Practical)
1 Use Following Tables:
Emp_Master (Emp_Code, Emp_Name, Birth_Date)
Dept_Master (Dept_Code, Dept_Name, Budget)
Salary (Dept_Code, Emp_Code, Salary)
Write a pl/sql block to call a procedure that counts total employees in each department and
display them. Also handles the exception where no record found.
www.ljku.edu.in July-Dec2024
Desirable List (Practical)
1 Write a stored procedure that uses an INOUT parameter and an IN parameter. The user will
supply 'M' or 'F' through IN parameter (emp_gender) to count a number of male or female
from Employee table. The INOUT parameter (mfgender) will return the result to a user.
Day - 37(Unit –5)
(PL/SQL Database Objects and Triggers)
Essential List (Practical)
1 Create a procedure to display the sum of salary of the employees whose job is accepted by the
user.
Day – 38(Unit –5)
(PL/SQL Database Objects and Triggers)
Essential List (Practical)
1 Create a procedure which gets the name of the employee when the employee id is passed
using IN and OUT parameter.
Desirable List (Practical)
1 Create a procedure to that takes as input the department number and passes two output
parameters-one giving the total number of employees in that department and the other giving
the maximum salary in that department
Day – 39(Unit –5)
(PL/SQL Database Objects and Triggers)
Essential List (Practical)
1 Create a function to return employee name whose salary is above 50000 from the
EmployeeInformation table.
Desirable List (Practical)
1 Create a function which returns total number of female employees from employee table.
Day – 40(Unit –5)
(PL/SQL Database Objects and Triggers)
Essential List (Practical)
1 Use Following Tables:
Emp_Master (Emp_Code, Emp_Name, Birth_Date)
Dept_Master (Dept_Code, Dept_Name, Budget)
Salary (Dept_Code, Emp_Code, Salary)
Write a pl/sql block to call a function that returns total employees in each department and
display them. Also handles the exception where no record found
Desirable List (Practical)
1 Use following tables and do as directed:
Movie (movie_id, movie name, date_of_release)
www.ljku.edu.in July-Dec2024
Screen (screen_id, location, max_capacity)
Current (movie_id,screen_id, date_of_arrival, date_of_closure)
1. Consider the above table and write a function to return the movie name which arrived
today. .
Day – 41(Unit –5)
(PL/SQL Database Objects and Triggers)
Essential List (Practical/Theory)
1 Create a package which stores the above functions and procedures.
2 Use following tables and do as directed:
Movie (movie_id, movie name, date_of_release)
Screen (screen_id, location, max_capacity)
Current (movie_id,screen_id, date_of_arrival, date_of_closure)
. Write a function that will return max_capacity of a screen by providing Screen_Id as a
parameter
Desirable List (Practical)
1 Use following tables and do as directed:
Movie (movie_id, movie_name, date_of_release)
Create a trigger on the movie table where trigger should be fired when the new movie is
added..
Day – 42(Unit –5)
(PL/SQL Database Objects and Triggers)
Essential List (Practical/Theory)
1 What is trigger? Explain its types.
2 Create a trigger on the movie table where trigger should be fired when the movie is deleted
Day – 43(Unit –5)
(PL/SQL Database Objects and Triggers)
Essential List (Practical/Theory)
1 Use following tables and do as directed:
College(collegeId,collegeName,location)
Course(CourseId, CourseName,CourseDuration,EligibleStudents)
Class(collegeId,CourseId,ClassStartDate,ClassEndDate)
. Write a function that will return Eligible Students of a course by providing CourseId as a
parameter
www.ljku.edu.in July-Dec2024
Day – 44(Unit –5)
(PL/SQL Database Objects and Triggers)
Essential List (Practical/Theory)
1 Use following tables and do as directed:
College(collegeId,collegeName,location)
Course (CourseId, CourseName, CourseDuration,
EligibleStudents,CourseStartDt.,CourseEndDt.)
Class(collegeId,CourseId,ClassStartDate,ClassEndDate)
Consider the above table and write a function to return the courseName which started from
today today
Day – 45(Unit –5)
(PL/SQL Database Objects and Triggers)
Essential List (Practical/Theory)
1 Subject_Master (Sub_code, Sub_name)
Student_Master (Roll_no, Stud_Name, Gender, DOB, Address)
Result (Roll_No, Sub_code, Marks)
Find out the average score in percentage for each subject.
Find out the students whose birthday falls into leap year.
Day – 46(All Units)
Essential List (Practical/Theory)
Revision
Day – 47(All Units)
Essential List (Practical/Theory)
Revision
Day – 48
Essential List (Practical/Theory)
Doubt Solving Session
www.ljku.edu.in July-Dec2024