3 Hours / 70 Marks: Seat No

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

22416

12223
3 Hours / 70 Marks Seat No.

Instructions – (1) All Questions are Compulsory.

(2) Answer each next main Question on a new page.

(3) Illustrate your answer with neat sketches wherever


necessary.

(4) Figures to the right indicate full marks.

(5) Assume suitable data, if necessary.

(6) Mobile Phone, Pager and any other Electronic


Communication devices are not permissible in
Examination Hall.

Marks

1. Attempt any FIVE of the following: 10


a) List any four RDBMS softwares.
b) Define Attribute and Domain.
c) Define view and write syntax for creating view.
d) State uses of synonyms (any two).
e) Define Trigger and list its types.
f) Draw state diagram of transaction.
g) List any four causes of database failures.

P.T.O.
22416 [2]
Marks
2. Attempt any THREE of the following: 12
a) Consider following schema :
Employee (Emp_no., Ename, Job, Salary, Join date, Dept_no)
Write SQL queries for following statements :
i) Add following record in Employee table :–
Emp_No = 100, Ename = Sagar, Job = Manager,
Salary = 80000. Joindate = 10-Jan-2021, Deptno = 10
ii) Change the name of employee ‘Raj’ to ‘Rajesh’.
iii) Delete all employees whose job is ‘Salesman’.
iv) Display details of employee whose job is ‘Clerk’.
b) Define Index and explain it’s types.
c) Describe block structure of PL/SQL.
d) Describe Grant and Revoke command with syntax and example.

3. Attempt any THREE of the following: 12


a) Describe Commit and Rollback command example.
b) Consider following schema :
Employee (Emp_id, Emp_name, Job, Salary, Dept-no)
Write SQL commands for following statements:
i) Create view Emp_VU20 that containts details of employee
in Dept-no 20.
ii) Display employee details from view Emp_VU20 whose
salary is greater than 50,000/-.
c) Write a PL/SQL code that accepts 3 numbers from user and
display largest number.
d) Define transaction and explain ACID properties of transaction.
22416 [3]
Marks
4. Attempt any THREE of the following: 12
a) Differentiate between Truncate and Drop table command.
b) Describe any four string functions with example.
c) Write SQL statements to perform following operations :
i) Create short name e30 for Emp_vu30 view.
ii) Create unique index on Emp_no column of Emp table.
d) Define cursor. Write step by step syntax to declare, open, fetch
and close cursor in PL/SQL block.
e) Write a PL/SQL code that handles divide by zero exception.

5. Attempt any TWO of the following: 12


a) Write SQL commands for following statements:
i) Create table for following schema:
Student (Roll-No, Name, Class, DOB).
ii) To add new column percentage to student table.
iii) To drop column DOB from student table.
b) Consider following schema :
Employee (Emp-no, Ename, Job, Salary, Joindate, Dept-no)
Write SQL queries for following statements :
i) List employees with having Alphabet ‘A’ as second letter
in their name.
ii) Display details of employee whose salary between 20000
and 50000.
iii) Display salary of all employees by increasing salary with
10%.
iv) Display details of employee except job as clerk.
v) Display details of employee whose job is clerk and dept_no
is 10.
vi) Display details of employee whose name does not contain
pattern ‘ra’.
c) Write PL/SQL function/procedure for following statements:
i) Write a function circle_area ( ) to find area of circle, use
radius as input parameter.
ii) Write a procedure emp_count ( ) to count number of
employee in department, use dept_no as input parameter.
P.T.O.
22416 [4]
Marks
6. Attempt any TWO of the following: 12
a) Consider following Schema :
Emp (Empid, Empname, Job, Salary, Deptno) Dept (Deptno,
Dname, Location)
Write SQL commands for the following statements.
i) Display all employee names in capital letters.
ii) Display total number of employees whose job is ‘Clerk’.
iii) Display maximum salary of each department.
iv) Display details of employee in descending order of salary.
v) Display employee names and their respective department
name.
vi) Display names of employee whose salary is greater than
salary of ‘Vijay’.
b) Write SQL commands to perform following operations on
sequence:
i) Create a sequence with following specifications:
• Name : DB_SEQ
• Starting value : 1
• Maximum value : 100
• Increment by : 2
ii) Modify a sequence named DB_SEQ with following
specifications :
• Increment by : 3
• Maximum value : 200
iii) Remove a sequence named DB_SEQ from database.
c) Write SQL commands for following statements :–
i) Create user Rajesh having password as Rajesh@123.
ii) Assign ALL privileges on Book table to Rajesh.
iii) Remove INSERT and DELETE privileges on book table
from Rajesh.

You might also like