DBMS Ca-2 K20SV Set-1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

SET-1

EMP_I FIRST_NA LAST_NA SALAR JOINING_DA DEPARTME


D ME ME Y TE NT

0011 Preeti Raheja 10000 2014-02-20 HR


0 09:00:00
0023 Geetika Jindal 80000 2014-06-11 Admin
09:00:00
0032 Suresh Sai 30000 2014-02-20 HR
0 09:00:00
0044 Yash Bhatia 50000 2014-02-20 Admin
0 09:00:00
0056 Kumar Gautam 50000 2014-06-11 Admin
0 09:00:00
0067 Kiran SaiTeja 20000 2014-06-11 Account
0 09:00:00
0073 Raj Goyal 75000 2014-01-20 Account
09:00:00
0089 Priya Jindal 90000 2014-04-11 Admin
09:00:00

Q1. Create the given database with the condition that entered salary should not
be less than 75000 and no null values to be there in FIRST_NAME.
(3 Marks)

Perform the following queries on created database.

1. SQL query to fetch “FIRST_NAME” from Employee table using the alias name
as ‘Employee_NAME’. (2 Mark)

2. Write an SQL query to fetch “LAST_NAME” from the table in upper case.
(1 Mark)

3. SQL query to extract the average salary given to the employees.


(1 Mark)

4. Change the department of Geetika from Admin to HR.


(1 Mark)

5. Delete the JOINING_DATE column from the database.


(2 Marks)
Q2. Check the given schedule for serializability:

All the methods for checking the serializability should be discussed with well
drawn schedules and diagrams, if any.
(10 Marks)

Q3. Suppose a transaction T accesses (for read or write operations), a certain set
of objects {O1,...,Ok}. This is done in the following manner: Step 1. T acquires
exclusive locks to O1, . . . , Ok in increasing order of their addresses. Step 2.
The required operations are performed. Step 3. All locks are released.

Which Concurrency control protocol will be suitable for the given scenario, justify
the answer will schedule as an example. (10 Marks)

You might also like