0% found this document useful (0 votes)
2 views

QUESTION (2)

This document outlines the final assessment for the CSE 302 Database Systems course at East West University, detailing the structure and requirements of the exam. It includes six questions covering topics such as database relations, transaction schedules, B+ trees, and normalization processes. Each question specifies the marks allocated and provides scenarios for students to analyze and respond to.

Uploaded by

2022-3-60-096
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)
2 views

QUESTION (2)

This document outlines the final assessment for the CSE 302 Database Systems course at East West University, detailing the structure and requirements of the exam. It includes six questions covering topics such as database relations, transaction schedules, B+ trees, and normalization processes. Each question specifies the marks allocated and provides scenarios for students to analyze and respond to.

Uploaded by

2022-3-60-096
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/ 3

14 September 2021

EAST WEST UNIVERSITY


Department of Computer Science and Engineering
B.Sc. in Computer Science and Engineering Program
Final Assessment (Online), Summer 2021 Semester
Course: CSE 302 Database Systems
Instructor: Mohammad Rezwanul Huq, Ph.D., Associate Professor, CSE Department
Full Marks: 100 (15 will be counted for final grading)
Time: 1 Hour 30 Minutes + 10 Minutes for uploading the answer

Note: There are 6 (SIX) questions. Answer ALL of them. The Mark of each question is mentioned at the right
margin.
1. Consider the following relation ‘Work’ that stores information about projects in a large business. [24]

We make the following assumptions.

i. Each project has a unique name.


ii. Names of employees and managers are not unique.
iii. The attribute projMgr stores the name of the manager of the project.
iv. A project can have many employees and an employee can also work on many projects.
The attribute hours tells the number of hours per week a particular employee is assigned
to work on a particular project.
v. The attribute empMgr gives the name of the employee’s manager, who might not be the
same as the project manager.
vi. The attribute empDept gives the employee’s department. Department names are unique.
The employee’s manager is the manager of the employee’s department.
vii. The attribute rating gives the employee’s performance rating for a particular project.
The project manager assigns the rating at the end of the employee’s work on that project.
viii. The rest of the attributes are self-explanatory.

Answer the following questions.

a) Determine the primary key of the Work relation and justify your answer. (4 marks)

b) How does delete anomaly can occur in the Work relation? Explain with an example. (4 marks)

c) Normalize the Work relation up to 3NF level. Explain your process at each step in detail. (12
marks)

d) Show the decomposed relations that you have obtained finally with the available data. (4
marks)

Page 1 of 3
14 September 2021

2. Consider the following relation EmpRoleProject. [10]

Suppose, you have been asked to decompose the given relation into two smaller relations such as
EmpRole (empName, role) and RoleProject (role, projName).

Determine what type of decomposition this is. Justify your answer in the context of the given
relation.

3. Let T1, T2 and T3 be transactions that operate on the same database items A, B, and C. Let r1(A) [24]
mean that T1 reads A, w1(A) mean that T1 writes A, and so on for T2 and T3.

Consider the following schedules S0, S1 and S2.


S0: r1(A); r2(A); w1(A); r3(A); w3(A); w2(A)
S1: r1(A); r1(B); r2(A); r3(B); r3(C); w2(A); w2(B); w3(C)
S2: r1(A); r3(C); r2(C); w3(A); r2(B); r3(B); w2(B); w2(A)

If the last digit of your id is odd you will answer the following questions for S0 and S1. Otherwise,
you will answer the following questions for S0 and S2 (even).

a) Determine whether the given schedules are serializable or not. If a schedule is serializable,
give an equivalent serial schedule. (16 marks)

b) Rewrite the two schedules by putting commit statements appropriately so that both are
recoverable and cascadeless schedules. The instruction commit1 indicates that transaction T1 has
committed. (8 marks)

4. Assume the following transactions are to be performed. [12]

Transaction T1 Transaction T2
1. read(a) 1. read(a)
2. a = a + 10 2. a = a × 2
3. write(a) 3. write(a)
4. read(b)
5. b = b × 5
6. write(b)

a) If the initial value of a is (last digit of your student id + 1) and the initial value of b is (last digit
of your student id + 1) × 2. What are their final values if we perform the transactions serially using
the order T1 and then T2? (6 marks)

Page 2 of 3
14 September 2021

b) Write a concurrent schedule for transactions T1 and T2 as mentioned above that illustrates the
lost update problem. (6 marks)

5. Determine which of the trees are valid B+ Trees. Justify your answer. [10]

a)

b)

c)

6. Suppose, you have an initially empty B+ tree of order n = 2. [20]

The following keys will be inserted one after another into the B+ Tree.

(last digit of your student id), 3, 9, 8, 7, 2, 1, 5, 10

Draw the resulting B+ Tree after each insertion.

Page 3 of 3

You might also like