1
GATE CSE 2014 Set 1
MCQ (Single Correct Answer)
+1
-0.3
Given the following statements:

S1: A foreign key declaration can always be replaced by an equivalent check assertion in SQL.

S2: Given the table R(a,b,c) where a and b together form the primary key, the following is a valid table definition.

CREATE TABLE S (
 a INTEGER,
 d INTEGER,
 e INTEGER,
 PRIMARY KEY (d),
 FOREIGN KEY (a) references R)

Which one of the following statements is CORRECT?

A
S1 is TRUE and S2 is FALSE.
B
Both S1 and S2 are TRUE.
C
S1 is FALSE and S2 is TRUE.
D
Both S1 and S2 are FALSE.
2
GATE CSE 2014 Set 1
MCQ (Single Correct Answer)
+2
-0.6

Given the following schema:

employees(emp-id, first-name, last-name, hire-date, dept-id, salary)

departments(dept-id, dept-name, manager-id, location-id)

You want to display the last names and hire dates of all latest hires in their respective departments in the location ID 1700. You issue the following query:
SQL> SELECT last-name, hire-date 
FROM employees WHERE (dept-id, hire-date) IN 
(SELECT dept-id, MAX(hire-date) 
FROM employees JOIN departments USING(dept-id) 
WHERE location-id = 1700
GROUP BY dept-id);
What is the outcome?
A
It executes but does not give the correct result.
B
It executes and gives the correct result.
C
It generates an error because of pairwise comparison.
D
It generates an error because the GROUP BY clause cannot be used with table joins in a sub-query.
3
GATE CSE 2014 Set 1
MCQ (Single Correct Answer)
+2
-0.6
Consider the following four schedules due to three transactions (indicated by the subscript) using read and write on a data item x, denoted by r(x) and w(x) respectively. Which one of them is conflict serializable?
A
r1(x); r2(x); w1(x); r3(x); w2(x)
B
r2(x); r1(x); w2(x); r3(x); w1(x)
C
r3(x); r2(x); r1(x); w2(x); w1(x)
D
r2(x); w2(x); r3(x); r1(x); w1(x)
4
GATE CSE 2014 Set 1
MCQ (Single Correct Answer)
+1
-0.3
Consider the relation schema $$R = \left( {E,\,F,\,G,\,H,\,I,\,J,\,K,L,\,M,\,N} \right)$$ and the set of functional dependencies $$\left\{ {\left\{ {E,F} \right\} \to \left\{ G \right\},\left\{ F \right\}} \right.$$
$$ \to \left\{ {I,J} \right\},\left\{ {E,H} \right\} \to \left\{ {K,L} \right\},\left\{ K \right\}$$
$$ \to \left\{ M \right\},\left\{ L \right\}$$
$$ \to \left. {\left\{ N \right\}} \right\}$$ on $$R.$$ What is the key for $$R?$$
A
$$\left\{ {E,F} \right\}$$
B
$$\left\{ {E,F,H} \right\}$$
C
$$\left\{ {E,\,F,\,H,\,K,\,L} \right\}$$
D
$$\left\{ E \right\}$$
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