adplus-dvertising
61. R(A,B,C,D) is a relation. Which of the following does not have a lossless join, dependency preserving BCNF decomposition?
a. A->B, B->CD
b. A->B, B->C, C->D
c. AB->C, C->AD
d. A ->BCD
Discuss
Answer: (c).AB->C, C->AD

62. Consider a relation geq which represents “greater than or equal to”, that is, (x,y) ∈ geq only if y >= x.

create table geq
(
ib integer not null
ub integer not null
primary key 1b
foreign key (ub) references geq on delete cascade
)

Which of the following is possible if a tuple (x,y) is deleted?
a. A tuple (z,w) with z > y is deleted
b. A tuple (z,w) with z > x is deleted
c. A tuple (z,w) with w < x is deleted
d. The deletion of (x,y) is prohibited
Discuss
Answer: (c).A tuple (z,w) with w < x is deleted

63. Given the following relation instance.

x y z
1 4 2
1 5 3
1 6 3
3 2 2

Which of the following functional dependencies are satisfied by the instance? (GATE CS 2000)
a. XY -> Z and Z -> Y
b. YZ -> X and Y -> Z
c. YZ -> X and X -> Z
d. XZ -> Y and Y -> X
Discuss
Answer: (b).YZ -> X and Y -> Z

64. Consider the relation X(P, Q, R, S, T, U) with the following set of functional dependencies

F = {
{P, R} → {S,T},
{P, S, U} → {Q, R}
}

Which of the following is the trivial functional dependency in F+ is closure of F?
a. {P,R}→{S,T}
b. {P,R}→{R,T}
c. {P,S}→{S}
d. {P,S,U}→{Q}
Discuss
Answer: (c).{P,S}→{S}

65. A relational database contains two tables student and department in which student table has columns roll_no, name and dept_id and department table has columns dept_id and dept_name. The following insert statements were executed successfully to populate the empty tables:

Insert into department values (1, 'Mathematics')
Insert into department values (2, 'Physics')
Insert into student values (l, 'Navin', 1)
Insert into student values (2, 'Mukesh', 2)
Insert into student values (3, 'Gita', 1)

How many rows and columns will be retrieved by the following SQL statement?

Select * from student, department
a. 0 row and 4 columns
b. 3 rows and 4 columns
c. 3 rows and 5 columns
d. 6 rows and 5 columns
Discuss
Answer: (d).6 rows and 5 columns

66. A table has fields Fl, F2, F3, F4, F5 with the following functional dependencies   F1 → F3   F2→ F4   (F1 . F2) → F5 In terms of Normalization, this table is in
a. 1 NF
b. 2 NF
c. 3 NF
d. none of the above
Discuss
Answer: (a).1 NF

67. Which of the following is NOT a superkey in a relational schema with attributes V, W, X, Y, Z and primary key V Y ?
a. V X Y Z
b. V W X Z
c. V W X Y
d. V W X Y Z
Discuss
Answer: (b).V W X Z

68. Let R (A, B, C, D, E, P, G) be a relational schema in which the following functional depen­dencies are known to hold: AB → CD, DE → P, C → E, P → C and B → G. The relational schema R is
a. in BCNF
b. in 3NF, but not in BCNF
c. in 2NF, but not in 3NF
d. not in 2NF
Discuss
Answer: (d).not in 2NF

69. Which option is true about the SQL query given below?

SELECT firstName, lastName
FROM Employee
WHERE lastName BETWEEN 'A%' AND 'D%';
a. It will display all the employees having last names starting with the alphabets 'A' till 'D' inclusive of A and exclusive of D.
b. It will throw an error as BETWEEN can only be used for Numbers and not strings.
c. It will display all the employees having last names starting from 'A' and ending with 'D'.
d. It will display all the employees having last names in the range of starting alphabets as 'A' and 'D' excluding the names starting with 'A' and 'D'.
Discuss
Answer: (a).It will display all the employees having last names starting with the alphabets 'A' till 'D' inclusive of A and exclusive of D.

70. Which of the given options define a transaction correctly?
a. A transaction consists of DDL statements on the database schema.
b. A transaction consists of COMMIT or ROLLBACK in a database session.
c. A transaction consists of either a collection of DML statements or a DDL or DCL or TCL statement to form a logical unit of work in a database session.
d. A transaction consists of collection of DML and DDL statements in different sessions of the database.
Discuss
Answer: (c).A transaction consists of either a collection of DML statements or a DDL or DCL or TCL statement to form a logical unit of work in a database session.