0% found this document useful (0 votes)
43 views12 pages

50438p Se252 God

Praticals

Uploaded by

swethasureshin.s
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)
43 views12 pages

50438p Se252 God

Praticals

Uploaded by

swethasureshin.s
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
You are on page 1/ 12

lOMoARcPSD|45409112

50438(P) SE252 - god

Computer Applications (University of Madras)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by Swetha Suresh (swethasureshin.s@gmail.com)
lOMoARcPSD|45409112

NOVEMBER 2022 50438 (P)/SE252

(For candidates admitted from 2020–2021)

Question Bank — Practical Examinations

B.C.A./B.Sc. DEGREE COURSE IN COMPUTER SCIENCE

Choice Based Credit System

Core Practical V – Fifth Semester

Practical IV — PL/SQL LAB

Time : Three hours Maximum : 60 marks


Question Bank is provided by the University for the
candidates admitted from the academic year 2020-2021 for
B.C.A./B.Sc. COMPUTER SCIENCE Degree Practical
Examinations. The Principal/Chief Superintendent/Examiners
are requested to read the given instruction carefully and strictly
adhere to the same at the time of conducting the practical
examinations.

INSTRUCTIONS TO THE PRINCIPAL/


CHIEF SUPERINTENDENT/EXAMINERS
1. Select the questions from the Question Bank provided by
the University on the basis of students strength.

2. Not more than three candidates should get the same


question in a batch.

3. Each question must be separated from the selected


questions from the Question Bank and should be pasted on
the answer paper in such a way that each answer paper is
pasted with only one question.

4. The answer paper pasted with question must be displayed,


without showing the questions to the students. The
students should select only one answer paper pasted with
question and do the practical.

Downloaded by Swetha Suresh (swethasureshin.s@gmail.com)


lOMoARcPSD|45409112

5. Selected questions from the Question Bank should be used


in each batch consisting of maximum 30 students.
Arrangements may kindly be made to take required
number of copies of the questions at the college.

6. No question must be prescribed by the examiner other than


the selected questions from the question bank provided by
the University for the B.C.A./B.Sc. Computer Science
practical examinations.

7. After selecting the questions, the Question Bank should be


handed over to the principal at once. The Principal are
asked to keep the Question Bank, which is a permanent
record, under safe custody and to utilise when conducting
the practical examinations of the subject concerned.

1. (a) Using Employee Database with two tables.


Employee_Personal_details as parent table with NOT
NULL and UNIQUE constraints for Employee_ID and
NOT NULL for age with Employee ID as primary key. Also
create another table Employee_Salary_details as child
table with reference of Employee_ID as foreign key. Use
DDL commands create and alter. Also create
Also perform the following queries
(i) Determine the names of employee, who earn more
than 20000.
(ii) Determine the names of employees, who take highest
salary in their departments.
(iii) Determine the employees, who are located at the
same place.
(iv) Determine the employees, whose total salary is like
the minimum salary of any department.
(v) Determine the department which does not contain
any employees.
(b) Write a PL/SQL program to demonstrate Exceptions.

2 50438 (P)/SE252

Downloaded by Swetha Suresh (swethasureshin.s@gmail.com)


lOMoARcPSD|45409112

2. (a) Create a table for payroll processing and perform do the


insertion, modification, deletion and aggregate functions
(count, max and min).
(b) Write PL/SQL queries to create Procedures.

3. (a) Write a query to the list of all students who were fail in the
particular subject and also find max marks in sub 1 and
average of sub 2 from total 5 subjects.
(b) Write PL/SQL queries to create Triggers.

4. (a) Write a program for student database and do the following


operations.
(i) Modification
(ii) Deletion
(iii) Aggregate functions count(), sum(), avg(), max(),
min()
(b) Write a PL/SQL program to demonstrate Packages.

5. (a) Create a Student Database with the following tables.


STUDENT_PERSONAL_INFO with fields (NAME,
ROLL_NO, ADDRESS, PHONE_NO)
STUDENT_CLASS_INFO with NAME, ROLL_NO,
SECTION.
Use subqueries to display NAME, PHONE_NO of the
Student Database whose section is “A”.
(b) Use appropriate Visual programming tools like oracle
forms and reports, visual basic etc to create user interface
screens and generate reports for library management.
3 50438 (P)/SE252

Downloaded by Swetha Suresh (swethasureshin.s@gmail.com)


lOMoARcPSD|45409112

6. (a) Create Employee Database with Employee_Personal (ID,


NAME, DOJ, AGE, ADDRESS, DEPARTMENT,
DESIGNATION) and Employee Salary (ID, NAME,
SALARY, BP, DA, HRA, CCA, GROSS_PAY, NET_PAY).
Use sql sub queries to updates the SALARY by 10 times in
the EMPLOYEE_Salary table for all employee whose AGE
is greater than or equal to 29.
(b) Write a PL/SQL program to demonstrate Functions.

7. (a) Use appropriate Visual programming tools like oracle


forms and reports, visual basic etc to create user interface
screens and generate reports for student mark sheet
processing.
(b) Write PL/SQL queries to create Triggers.

8. (a) Write a PL/SQL program to demonstrate Packages.


(b) Use appropriate Visual programming tools like oracle
forms and reports, visual basic etc to create user interface
screens and generate reports for Pay roll processing.

9. (a) Create an employee data base and divided into certain the
database into certain departments and each department
consists of employees. The following two tables describes
the schemes.
Dept_table (deptno, dname, loc)
Emp_table (empno, ename, job, mgr, hiredate, sal, comm,
deptno)
(i) Update the employee salary by 15%, whose
experience is greater than 10 years.
(ii) Delete the employees, who completed 30 years of
service.
(iii) Display the manager who is having maximum
number of employees working under him?
(iv) Create a view, which contain employee names and
their manager.
Generate a report of employees who gets more than
20000 salary.
(b) Write PL/SQL queries to create Triggers.
4 50438 (P)/SE252

Downloaded by Swetha Suresh (swethasureshin.s@gmail.com)


lOMoARcPSD|45409112

10. (a) Write a PL/SQL program to demonstrate Cursors.


(b) Use VB as the front-end tool and any RDBMS as the back-
end tool. Create database and performing the operations
Insertion, Deletion, Modification for Payroll processing.
DA as 30% of Basic pay, HRA as 20% of Basic pay, PF as
18% of Basic pay.
Gross_pay as Basic Salary + HRA + DA.
Net_Pay as Gross_Pay – PF.
Calculate Gross pay and Net pay using given formula and
also generate a simple report.

11. (a) As a designer identify the PL/SQL procedures necessary


and create them using cursors.
(b) The student mark sheet database containing student’s
Name, Roll No, Exam ID, Subject marks say
m1, m2, m3, m4, m5, total, average and grade.
Display the details using sql queries for the following.
(i) avg 80 means “Outstanding”
(ii) avg 75 means “First class”
(iii) avg between 50 and 60 “Second class”
(iv) avg 50 means “Fail”.

12. (a) Consider the following tables namely “DEPARTMENTS”


and “EMPLOYEES” Their schemas are as follows.
Departments (dept _no, dept_ name, dept_location);
Employees (emp_id, emp_name, emp_salary, dept_no);
(i) Develop a query to use all DDL commands and
constraints.
(ii) Develop a query to use all DML commands and
constraints.
(iii) Generate a report of employees who joins after
1-jan-2020.
(b) Write a PL/SQL program to demonstrate Procedure and
Functions.

5 50438 (P)/SE252

Downloaded by Swetha Suresh (swethasureshin.s@gmail.com)


lOMoARcPSD|45409112

13. (a) Create a table called Employee with the following


structure.
Empno (Number), Ename (Varchar2(20)), Job
(Varchar2(20) ), Sal (Number)
(i) Add a column DoJ (DATE) with the Employee table.
(ii) Insert any five records into the table.
(iii) Update the column details of job
(iv) Rename the column Sal as Emp_Salary of Employ
table using alter command.
(v) Delete the employee whose empno is 101.
(b) Write a PL/SQL program to demonstrate Exceptions.

14. (a) Create department table with the following structure.


Deptno (Number), Deptname (Varchar2(20)), location
(Varchar2(20))
(i) Add column designation to the department table.
(ii) Insert values into the table.
(iii) List the records of emp table grouped by deptno.
(iv) Update the record where deptno is 5.
(v) Delete any column data from the table
(b) Write PL/SQL queries to create Triggers.

15. (a) Create an Emp table with the following fields:


(EmpNo, EmpName, Job, Basic, DA, HRA, PF, GrossPay,
NetPay)
(Calculate DA as 30% of Basic and HRA as 40% of Basic)
(i) Insert Five Records and calculate GrossPay and
NetPay.
(Gross_pay as Basic Salary + HRA + DA and Net_Pay
as Gross_Pay – PF.)
(ii) Display the employees whose Basic is lowest in each
department.
(iii) If NetPay is less than Rs.10,000 add Rs.1,200 as
special allowances.
(iv) Display the employees whose GrossPay lies between
10,000 and 20,000
(v) Display all the employees who earn maximum salary.
(b) Write a PL/SQL program to demonstrate Packages.

6 50438 (P)/SE252

Downloaded by Swetha Suresh (swethasureshin.s@gmail.com)


lOMoARcPSD|45409112

16. (a) Write a program to create database and perform the


operations given below.
(i) Insertion
(ii) Deletion
(iii) Generate a simple report for the students admitted
between 2010 to 2020.
(b) Write a PL/SQL program to demonstrate Exceptions.

17. (a) Write a PL/SQL program to demonstrate Procedure and


Functions.
(b) Consider the details of student database with Reg.no,
Name, Marks in 3 subjects. Generate a result report if
marks in any subject is <50 then the student fails in the
subject.

18. (a) Write an application program to perform the basic DML


operations with constraints related to “Employee
Database”.
(b) Write a PL/SQL program to demonstrate Procedure and
functions.

19. (a) Write an application program to perform the basic DDL


operations with constraints related to “Library
Management”.
(b) Write a PL/SQL program to demonstrate Packages.

7 50438 (P)/SE252

Downloaded by Swetha Suresh (swethasureshin.s@gmail.com)


lOMoARcPSD|45409112

20. (a) Write PL/SQL queries to create Triggers.


(b) Create a table for “Library Management System” and do
the insertion, modification and deletion and prepare simple
reports.

21. (a) To write a Cursor to display the list of employees who are
Working as a Managers or Analyst
(b) Create “Employee” table with personal and salary details.
(i) By using the group by clause, display the enames who
belongs to deptno 10 along with average salary.
(ii) Display lowest paid employee details under each
department.
(iii) Display number of employees working in each
department and their department number.
(iv) Using built in functions, display number of employees
working in each department and their department
name from dept table. Insert deptname to dept table
and insert deptname for each row, do the required
thing specified above.
(v) List all employees which start with either B or C.
(vi) Display only these ename of employees where the
maximum salary is greater than or equal to 5000.

22. (a) Write PL/SQL Programs in Cursors using Loops.


(b) Develop “Employee” details table.
(i) Count the number of employees in department 20
(ii) Find the minimum salary earned by clerk.
(iii) Find minimum, maximum, average salary of all
employees.
(iv) List the minimum and maximum salaries for each job
type.
(v) List the employee names in descending order.
(vi) List the employee id, names in ascending order by
empid.
8 50438 (P)/SE252

Downloaded by Swetha Suresh (swethasureshin.s@gmail.com)


lOMoARcPSD|45409112

23. (a) Design “Employee” database with your own data and
perform the following.
(i) Show that two substring as single string.
(ii) List all employee names, salary and 15% rise in
salary.
(iii) Display lowest paid emp details under each manager
(iv) Display the average monthly salary bill for each
deptno.
(v) Show the average salary for all departments
employing more than two people.
(vi) By using the group by clause, display the eid who
belongs to deptno 05 along with average salary.
(b) Write PL/SQL code to display Employee details using
Explicit Cursors.

24. (a) Create a “Student” table and do to following.


(i) Create a user and grant all permissions to the user.
(ii) Update the table reserves and use save point and
rollback.
(iii) Add constraint primary key, foreign key and not null
to the reserves table
(iv) Delete constraint not null to the table column.
(b) Write PL/SQL code Program to Create stored procedures
and functions.

25. (a) Create “Student” table with 5 attributes and do the


following.
(i) Create a user and grant all permissions to the user.
(ii) Use revoke command to remove user permissions.
(iii) Change password of the user created.
(iv) Add constraint foreign key and not null.
(b) Write PL/SQL code in Procedure using procedure call.

9 50438 (P)/SE252

Downloaded by Swetha Suresh (swethasureshin.s@gmail.com)


lOMoARcPSD|45409112

26. (a) Create a “Employee” table with minimum 6 attributes.


Also do the following.
(i) Create a user and grant all permissions to the user.
(ii) Insert values in the department table and use
commit.
(iii) Add constraints like unique and not null to the
department table.
(iv) Insert repeated values and null values into the table.
(b) Write a PL/SQL procedure to work with Arithmetic
operations.

27. (a) Create “Employee” table and do the following.


(i) Create a user and grant all permissions to the user.
(ii) Insert the any three records in the employee table
and use rollback. Check the result.
(iii) Add primary key constraint and not null constraint to
the employee table
(iv) Insert null values to the employee table and verify
the result
(b) Write PL/SQL Programs in Cursors using two cursors at a
time and display employee names and salary.

28. (a) Create a table called Branch table.


Name Type
Branch name Varchar2(20)
Branch_city Varchar2(20)
Asserts Number
(i) Increase the size of data type for Asserts to the
branch
(ii) Add and drop a column to the Branch table
(iii) Insert values to the table.
(iv) Update the Branch_name column
(v) Delete any two columns from the table
(b) Write PL/SQL code in Function for Factorial number and
Prime number.

10 50438 (P)/SE252

Downloaded by Swetha Suresh (swethasureshin.s@gmail.com)


lOMoARcPSD|45409112

29. (a) Create a table called Stock table


Name Type
Sid Number
Sname Varchar2(20)
Rating Varchar2(20)
(i) Add column age to the Stock table.
(ii) Insert values into the Stock table.
(iii) Delete the row with Rating 8.
(iv) Update the column details of Stock.
(v) Insert null values into the table.
(b) Write a PL/SQL block to handle the following BUILT-IN
EXCEPTIONS.

30. (a) Create a table called Customer table


Name Type
Cust_name Varchar2(20)
Cust_street Varchar2(20)
Cust_city Varchar2(20)
(i) Insert records into the table.
(ii) Add salary column to the table.
(iii) Alter the table column domain.
(iv) Drop salary column of the customer table.
(v) Delete the rows of customer table whose cust_city is
“New York”.
(b) Write pl/sql code using Trigger to salary with more than
old salary.

___________________

11 50438 (P)/SE252

Downloaded by Swetha Suresh (swethasureshin.s@gmail.com)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy