1
GATE CSE 2021 Set 2
MCQ (Single Correct Answer)
+2
-0.66

The relation scheme given below is used to store information about the employees of a company, where empId is the key and deptId indicates the department to which the employee is assigned. Each employee is assigned to exactly one department.

emp(empId, name, gender, salary, deptId)

Consider the following SQL query:

select deptId, count(⋆)

from emp

where gender = "female" and salary > (select avg(salary) from emp)

group by deptId;

The above query gives, for each department in the company, the number of female employees whose salary is greater than the average salary of

A
female employees in the department.
B
employees in the department.
C
employees in the company.
D
female employees in the company.
2
GATE CSE 2021 Set 2
MCQ (Single Correct Answer)
+1
-0.33

Consider the following statements S1 and S2 about the relational data model:

S1: A relation scheme can have at most one foreign key.

S2: A foreign key in a relation scheme R cannot be used to refer to tuples of R.

Which one of the following choices is correct? 

A
S1 is true and S2 is false.  
B
Both S1 and S2 are true.  
C
Both S1 and S2 are false.  
D
S1 is false and S2 is true. 
3
GATE CSE 2021 Set 2
MCQ (More than One Correct Answer)
+2
-0

Suppose the following functional dependencies hold on a relation U with attributes P, Q, R, S, and T :

P → QR

RS → T

Which of the following functional dependencies can be inferred from the above functional dependencies?  

A
P → R
B
PS → T
C
R → T
D
PS → Q
4
GATE CSE 2021 Set 2
MCQ (Single Correct Answer)
+2
-0.66

Let S be the following schedule of operations of three transactions T1, T2 and T3 in a relational database system:

R2(Y), R1(X), R3(Z), R1(Y), W1(X), R2(Z), W2(Y), R3(X), W3(Z)

Consider the statements P and Q below:

P: S is conflict-serializable.

Q: If T3 commits before T1 finishes, then S is recoverable.

Which one of the following choices is correct?

A
P is true and Q is false.
B
Both P and Q are true.
C
P is false and Q is true.
D
Both P and Q are false.
EXAM MAP
Medical
NEETAIIMS
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
Staff Selection Commission
SSC CGL Tier I
CBSE
Class 12