Databases questions

Q21

GATE CS 2016 CS-1Relational DesignMCQ1 mark−1/3 if wrong
Which of the following is NOT a superkey in a relational schema with attributes V,W,X,Y,ZV, W, X, Y, Z and primary key VYVY?
Show answer without attempting

Answer: B

Q22

GATE CS 2016 CS-1TransactionsMCQ1 mark−1/3 if wrong
Which one of the following is NOT a part of the ACID properties of database transactions?
Show answer without attempting

Answer: D

Q23

GATE CS 2016 CS-1Relational DesignMCQ1 mark−1/3 if wrong
A database of research articles in a journal uses the following schema.
(VOLUME, NUMBER, STARTPAGE, ENDPAGE, TITLE, YEAR, PRICE)
The primary key is (VOLUME, NUMBER, STARTPAGE, ENDPAGE) and the following functional dependencies exist in the schema.
(VOLUME, NUMBER, STARTPAGE, ENDPAGE) →\to TITLE
(VOLUME, NUMBER) →\to YEAR
(VOLUME, NUMBER, STARTPAGE, ENDPAGE) →\to PRICE
The database is redesigned to use the following schemas.
(VOLUME, NUMBER, STARTPAGE, ENDPAGE, TITLE, PRICE)
(VOLUME, NUMBER, YEAR)
Which is the weakest normal form that the new database satisfies, but the old one does not?
Show answer without attempting

Answer: B

Q51

GATE CS 2016 CS-1TransactionsMCQ2 marks−2/3 if wrong
Consider the following two phase locking protocol. Suppose a transaction T accesses (for read or write operations), a certain set of objects {O1,…,Ok}\{O_1, \dots, O_k\}. This is done in the following manner:
Step 1. T acquires exclusive locks to O1,…,OkO_1, \dots, O_k in increasing order of their addresses.
Step 2. The required operations are performed.
Step 3. All locks are released.
This protocol will
Show answer without attempting

Answer: A

Q21

GATE CS 2016 CS-2Storage and IndexingMCQ1 mark−1/3 if wrong
B+ Trees are considered BALANCED because
Show answer without attempting

Answer: A

Q22

GATE CS 2016 CS-2TransactionsMCQ1 mark−1/3 if wrong
Suppose a database schedule SS involves transactions T1,…,TnT_1, \dots, T_n. Construct the precedence graph of SS with vertices representing the transactions and edges representing the conflicts. If SS is serializable, which one of the following orderings of the vertices of the precedence graph is guaranteed to yield a serial schedule?
Show answer without attempting

Answer: A

Q51

GATE CS 2016 CS-2TransactionsMCQ2 marks−2/3 if wrong
Consider the following database schedule with two transactions, T1T_1 and T2T_2.
S=r2(X);r1(X);r2(Y);w1(X);r1(Y);w2(X);a1;a2S = r_2(X); r_1(X); r_2(Y); w_1(X); r_1(Y); w_2(X); a_1; a_2

where ri(Z)r_i(Z) denotes a read operation by transaction TiT_i on a variable ZZ, wi(Z)w_i(Z) denotes a write operation by TiT_i on a variable ZZ and aia_i denotes an abort by transaction TiT_i.

Which one of the following statements about the above schedule is TRUE?
Show answer without attempting

Answer: C

Q52

GATE CS 2016 CS-2Relational QueriesNAT2 marks
Consider the following database table named water_schemes :
scheme_nodistrict_namecapacity
1Ajmer20
1Bikaner10
2Bikaner10
3Bikaner20
1Churu10
2Churu20
1Dungargarh10
The number of tuples returned by the following SQL query is _________.
with total(name, capacity) as
    select district_name, sum(capacity)
    from water_schemes
    group by district_name
with total_avg(capacity) as
    select avg(capacity)
    from total
select name
    from total, total_avg
    where total.capacity ≥ total_avg.capacity
Show answer without attempting

Answer: 2.0

0/80 correct0 marks

Related topics in GATE CS