1
GATE CSE 2014 Set 3
MCQ (Single Correct Answer)
+1
-0.3
A prime attribute of a relation scheme $$R$$ is an attribute that appears
A
In all candidate keys of $$R$$
B
In some candidate key of $$R.$$
C
In a foreign key of $$R.$$
D
Only in the primary key of $$R.$$
2
GATE CSE 2014 Set 3
MCQ (Single Correct Answer)
+2
-0.6

Consider the following relational schema:

employee (empId, empName, empDept )

customer (custId, custName, salesRepId, rating)

SalesRepId is a foreign key referring to empId of the employee relation. Assume that each employee makes a sale to at least one customer. What does the following query return?
SELECT empName 
FROM employee E 
WHERE NOT EXISTS (SELECT custId 
       FROM customer C 
       WHERE C.salesRepId = E.empId 
       AND C.rating <> 'GOOD');
A
Names of all the employees with at least one of their customers having a 'GOOD' rating.
B
Names of all the employees with at most one of their customers having a 'GOOD' rating.
C
Names of all the employees with none of their customers having a 'GOOD' rating.
D
Names of all the employees with all their customers having a 'GOOD' rating.
3
GATE CSE 2014 Set 3
MCQ (Single Correct Answer)
+1
-0.3
What is the optimized version of the relation algebra expression $$\pi_{A1}(\pi_{A2}(\sigma_{F1}(\sigma_{F2}(r))))$$, where $$A1, A2$$ are sets of attributes in r with $$A1 \subset A2$$ and $$F1,F2$$ are Boolean expressions based on the attributes in r?
A
$$\pi_{A1}(\sigma_{(F1 \wedge F2)}(r))$$
B
$$\pi_{A1}(\sigma_{(F1 \vee F2)}(r))$$
C
$$\pi_{A2}(\sigma_{(F1 \wedge F2)}(r))$$
D
$$\pi_{A2}(\sigma_{(F1 \vee F2)}(r))$$
4
GATE CSE 2014 Set 3
MCQ (Single Correct Answer)
+2
-0.6
Consider the relational schema given below, where eId of the relation dependent is a foreign key referring to empId of the relation employee. Assume that every employee has at least one associated dependent in the dependent relation:

employee (empId, empName, empAge)

dependent (depId, eId, depName, depAge)

Consider the following relational algebra query: $$\Pi_{empId}\:(employee) - \Pi_{empId}\:(employee \bowtie_{(empId=eID) \wedge (empAge \leq depAge)} dependent)$$

The above query evaluates to the set of empIds of employees whose age is greater than that of

A
some dependent.
B
all dependents.
C
some of his/her dependents.
D
all of his/her dependents.
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12