PES University, Bengaluru
PES University, Bengaluru
2.a. Describe the steps in a line or two to convert Entity Relationship diagram into
Relational Mapping (7.0 Marks)
2.c. Briefly discuss different types of Constraints in Relational Model (5.0 Marks)
3.a. Consider the following relation:
Employee(Eid, Ename, Salary, dno)
Department(dno,dname)
On executing the below two sql statements in sequence, what will be the output of
select statement.
Update T1 set marks =marks + 5 ; select avg(marks) from T1 ;
ii) Consider the following table student. What will be the output of these SQL
queries:
a: Select count(*) from student;
b: Select count(marks) from student;
Student table:
ID Sname Marks
1 Uma 10
2 Dheeraj 20
3 Rio Null
4 Rio Null
(4.0 Marks)
3.c. What are Virtual tables or View in SQL? Specify different ways to handle view
materialization. (6.0 Marks)
4.a. Define the following:
1) Candidate Key
2) Non Prime attribute
3) Second normal form
4) Super key
5) Spurious Tuples (5.0 Marks)
4.b. Given below are two sets of FDs F1 and F2 for a relation R(A,B,C,D,E). Are they
equivalent?
F1 = A->B, AB->C, D->AC, D->E
F2 = A->BC, D->AE (8.0 Marks)
4.c. For the relation R =(P, Q, R, S) and set of following functional dependency
F = {R→S, R→P, Q→R}
i. Identify all the candidate keys of R
ii. Which normal form is R in?
Decompose R into a set of BCNF relations. (7.0 Marks)
5.d. What are ACID properties in transactions? Specify the need for ACID
properties. (5.0 Marks)