Database-Management-System
Question 1 |
Which one of the following statements is NOT correct about the B+ tree data structure used for creating an index of a relational database table?
Each leaf node has a pointer to the next leaf node | |
Non-leaf nodes have pointers to data records | |
B+ Tree is a height-balanced tree | |
Key values in each node are kept in sorted order |
In B+ trees non-leaf nodes do not have pointers to data records.
Question 2 |
Consider the following two statements about database transaction schedules:
I. Strict two-phase locking protocol generates conflict serializable schedules that are also recoverable. II. Timestamp-ordering concurrency control protocol with Thomas Write Rule can generate view serializable schedules that are not conflict serializable.Which of the above statements is/are TRUE?
Both I and II | |
Neither I nor II | |
II only | |
I only |
In strict 2PL, a transaction T does not release any of its exclusive (write) locks until after it commits or aborts.
Hence, no other transaction can read or write an item that is written by T unless T has committed, leading to a strict schedule for recoverability.
(Ref: Fundamentals of Database Systems by Elmasri and Navathe, 7e Pg. No. 789)
By ignoring the write, Thomas write rule allows schedules that are not conflict serializable but are nevertheless correct.
Those non-conflict-serializable schedules allowed satisfy the definition of view serializable schedules.
(Ref: Database System Concepts by Silberschatch, Korth and Sudarshan, 6e Pg No. 686)
Question 3 |
Consider the following relations P(X,Y,Z), Q(X,Y,T) and R(Y,V).

How many tuples will be returned by the following relational algebra query?
∏x(σ(P.Y=R.Y ∧ R.V=V2)(P × R)) - ∏x(σ(Q.Y=R.Y ∧ Q.T>2)(Q × R))
0 | |
1 | |
2 | |
3 |

∏x(σ(P.Y=R.Y ∧ R.V=V2)(P × R))

σ(Q.Y=R.Y ∧ Q.T>2)(Q × R)


∏x(σ(P.Y=R.Y ∧ R.V=V2)(P × R)) - ∏x(σ(Q.Y=R.Y ∧ Q.T>2)(Q × R))

Question 4 |
A relational database contains two tables Student and Performance as shown below:

The primary key of the Student table is Roll_no. For the Performance table, the columns Roll_no. and Subject_code together from the primary key. Consider the SQL query given below:
SELECT S.Student_name, sum (P.Marks) FROM Student S, Performance P WHERE P.Marks > 84 GROUP BY S.Student_name;
The number of rows returned by the above SQL query is _____.
0 | |
9 | |
7 | |
5 |
SQL> SELECT S.Student_name,sum(P.Marks)
2 FROM Student S,Performance P
3 WHERE P.Marks>84
4 GROUP BY S.Student_name;

Question 5 |
Let the set of functional dependencies F = {QR → S, R → P, S → Q} hold on a relation schema X = (PQRS). X is not in BCNF. Suppose X is decomposed into two schemas Y and Z, where Y = (PR) and Z = (QRS).
Consider the two statements given below.I. Both Y and Z are in BCNF II. Decomposition of X into Y and Z is dependency preserving and losslessWhich of the above statements is/are correct?
I only | |
Neither I nor II | |
II only | |
Both I and II |
R → P
R+ = RP
* In R → P, 'R' is a super key. So, Y is in BCNF.
Z = (QRS)
QR → S
S → Q
CK's = QR, RS
* In, S → Q, 'S' is not a super key. So, Z is not in BCNF.
* Y is in BCNF and Z is not in BCNF.
* 'R' is common attribute in the relations Y and Z and R is candidate key for Y. So, the decomposition is lossless.
* The FD, R → P is applicable on Y and QR → S, S → Q are applicablein 2.
So, the decomposition is dependency preserving.
* Hence, Statement II is correct.
Question 6 |
Consider a relational database containing the following schemas.

The primary key of each table is indicated by underlying the constituent fields.
SELECT s.sno, s.sname
FROM Suppliers s, Catalogue c
WHERE s.sno = c.sno AND
Cost > (SELECT AVG (cost)
FROM Catalogue
WHERE pno = ‘P4’
GROUP BY pno);
The number of rows returned by the above SQL query is
0 | |
5 | |
4 | |
2 |
AVG(COST)
------------
225
The outer query “select s.sno,s.sname from suppliers s, catalogue c where s.sno=c.sno” returns:
SNO SNAME
----------------------------------------
S1 M/s Royal furniture
S1 M/s Royal furniture
S1 M/s Royal furniture
S2 M/s Balaji furniture
S2 M/s Balaji furniture
S3 M/s Premium furniture
S3 M/s Premium furniture
S3 M/s Premium furniture
S3 M/s Premium furniture
So, the final result of the query is:
SN SNAME
----------------------------------------
S2 M/s Balaji furniture
S3 M/s Premium furniture
S3 M/s Premium furniture
S3 M/s Premium furniture
Therefore, 4 rows will be returned by the query.
Question 7 |
Ovals that contain underlined identifiers
| |
Rectangles with double/bold border
| |
Diamonds with double/bold border
| |
Ovals with double/bold border
|

Question 8 |

Here, RX stands for “Read(X)” and WX stands for “Write(X)”. Which one of the following schedules is conflict equivalent to the above schedule?
![]() | |
![]() | |
![]() | |
![]() |
• First, let’s list the conflict operations of each of the schedule given in the options and compare with the conflict operations of schedule which is given in the question.
Given schedule:





The conflict operations in the option (2) and given schedule are appearing in the same sequence order, so option (2) is the answer.
Question 9 |
A cell in R holds a set instead of an atomic value.
| |
R has a nontrivial functional dependency X-->A, where X is not a superkey and A is a non-prime attribute and X is not a proper subset of any key.
| |
R has a nontrivial functional dependency X-->A, where X is not a superkey and A is a non-prime attribute and X is a proper subset of some key.
| |
R has a nontrivial functional dependency X-->A, where X is not a superkey and A is a prime attribute.
|
FDs:
AB → C
BC → A
(BD)+ = BD ✖
(ABD)+ = ABDC ✔
(CBD)+ = CBDA ✔
Candidate keys = {ABD, CBD}
• The relation R is in 3NF, as there are no transitive dependencies.
• The relation R is not in BCNF, because the left side of both the FD’s are not Super keys.
• In R, BC → A is a non-trivial FD and in which BC is not a Super key and A is a prime attribute.
Question 10 |
4 |

Question 11 |
In an Entity-Relationship (ER) model, suppose R is a many-to-one relationship from entity set E1 to entity set E2. Assume that E1 and E2 participate totally in R and that the cardinality of E1 is greater than the cardinality of E2.
Which one of the following is true about R?
Every entity in E1 is associated with exactly one entity in E2.
| |
Some entity in E1 is associated with more than one entity in E2.
| |
Every entity in E2 is associated with exactly one entity in E1.
| |
Every entity in E2 is associated with at most one entity in E1.
|

The M : 1 relationship holds between two entities E1 and E2, in which each tuple from E2 is in relation with many tuples of E1. One tuple from E1 is in relation with only one tuple of E2. It is given that participation from both the sides is total and the cardinality of E1 is greater than E2.

Therefore, every entity E1 is associated with exactly one entity in E2.
Question 12 |
Consider the following two tables and four queries in SQL.
Book (isbn, bname), Stock (isbn, copies)Query 1: SELECT B.isbn, S.copies FROM Book B INNER JOIN Stock S ON B.isbn = S.isbn; Query 2: SELECT B.isbn, S.copies FROM Book B LEFT OUTER JOIN Stock S ON B.isbn = S.isbn; Query 3: SELECT B.isbn, S.copies FROM Book B RIGHT OUTER JOIN Stock S ON B.isbn = S.isbn; Query 4: SELECT B.isbn, S.copies FROM Book B FULL OUTER JOIN Stock S ON B.isbn = S.isbn;
Which one of the queries above is certain to have an output that is a superset of the outputs of the other three queries?
Query 1
| |
Query 2 | |
Query 3 | |
Query 4 |
Book (isbn, bname)
Stock (isbn, copies)
isbn is a primary key of Book and isbn is a foreign key of stock referring to Book table.
For example:

Query 1:
INNER JOIN keyword selects records that have matching values in both tables (Book and Stock).

So, the result of Query 1 is,

Query 2:
The LEFT OUTER JOIN keyword returns all records from the left table (Book) and the matched records from the right table (Stock).
The result is NULL from the right side, if there is no match.

So, the result of Query 2 is,

Query 3:
The RIGHT OUTER JOIN keyword returns all records from the right table (Stock), and the matched records from the left table(BOOK).
The result is NULL from the left side, when there is no match.


Query 4:
The FULL OUTER JOIN keyword return all records when there is a match in either left (Book) or right (Stock) table records.

So, the result of Query 4 is,

Therefore, from the result of above four queries, a superset of the outputs of the Query 1, Query 2 and Query 3 is Query 4.
Note:
If we take isbn as a primary key in both the tables Book and Stock and foreign key, in one of the tables then also will get option (D) as the answer.
Question 13 |
Consider the following four relational schemas. For each schema, all non-trivial functional dependencies are listed. The underlined attributes are the respective primary keys.
Schema I: Registration(rollno, courses) Field ‘courses’ is a set-valued attribute containing the set of courses a student has registered for. Non-trivial functional dependency rollno → courses Schema II: Registration (rollno, coursid, email) Non-trivial functional dependencies: rollno, courseid → email email → rollno Schema III: Registration (rollno, courseid, marks, grade) Non-trivial functional dependencies: rollno, courseid, → marks, grade marks → grade Schema IV: Registration (rollno, courseid, credit) Non-trivial functional dependencies: rollno, courseid → credit courseid → credit
Which one of the relational schemas above is in 3NF but not in BCNF?
Schema I | |
Schema II | |
Schema III | |
Schema IV |
Registration (rollno, courses) rollno → courses
For the given schema Registration ‘rollno’ is a primary key.
Left-side of the functional dependency is a superkey so, Registration is in BCNF.
Schema II:
Registrstion (rollno, courseid, email)
rollno, courseid → email
email → rollno
From the given schema the candidate key is (rollno + courseid).
There is no part of the key in the left hand of the FD’s so, it is in 2NF.
In the FD email→rollno, email is non-prime attribute but rollno is a prime attribute.
So, it is not a transitive dependency.
No transitive dependencies so, the schema is in 3NF.
But in the second FD email→rollno, email is not a superkey.
So, it is violating BCNF.
Hence, the schema Registration is in 3NF but not in BCNF.
Schema III:
Registration (rollno, courseid, marks, grade)
rollno, courseid → marks, grade
marks → grade
For the schema the candidate key is (rollno + courseid).
There are no part of the keys are determining non-prime attributes.
So, the schema is in 2NF.
In the FD marks → grade, both the attributes marks and grade are non-prime.
So, it is a transitive dependency.
The FD is violating 3NF.
The schema Registration is in 2NF but not in 3NF.
Schema IV:
Registration (rollno, courseid, credit)
rollno, courseid → credit
courseid → credit
The candidate key is (rollno + courseid).
In the FD, courseid → credit, courseid is part of the key (prime attribute) and credit is non-prime.
So, it is a partial dependency.
The schema is violating 2NF.
Question 14 |
Consider the relations r(A, B) and s(B, C), where s.B is a primary key and r.B is a foreign key referencing s.B. Consider the query
-
Q: r⋈(σB<5(s))
Let LOJ denote the natural left outer-join operation. Assume that r and s contain no null values.
Which one of the following is NOT equivalent to Q?
σB<5 (r ⨝ s)
| |
σB<5 (r LOJ s)
| |
r LOJ (σB<5(s))
| |
σB<5(r) LOJ s |
Consider the following tables without NULL values.

Q: r⨝(σB<5(S))
The result of σB<5(S) is

The result of σB<5(S) is

Option (A):
The result of r⨝S is

The result of σB<5(r⨝S) is

Option (B):
The result of r LOJ S is

The result of σB<5(r LOJ S) is

Option (C):
The result of σB<5(S) is

Now, the result of r LOJ(σB<5(S))

Option (D):
The result of σB<5(r) is

Now, the result of σB<5(r) LOJ S is

Therefore, from the output of above four options, the results of options, the results of options (A), (B) and (D) are equivalent to Q.
Question 15 |
The following functional dependencies hold true for the relational schema {V, W, X, Y, Z} :
-
V → W
VW → X
Y → VX
Y → Z
Which of the following is irreducible equivalent for this set of functional dependencies?
V→W V→X Y→V Y→Z | |
V→W W→X Y→V Y→Z | |
V→W V→X Y→V Y→X Y→Z | |
V→W W→X Y→V Y→X Y→Z |
V → W, VW → X, Y → V, Y → X, Y→ Z
Step 2:
V → W, VW → X, Y → V, Y → X, Y→ Z
(V)+ = V ×
(VW)+ = VW ×
(Y)+ = YXZ
(Y)+ = YVW ×
(Y)+ = YVWX
Without Y → X, the closure of Y is deriving ‘X’ from the remaining attributes.
So, we can remove Y → X as its redundant.
Step 3:
V → W, VW → X, Y → V, Y → Z
(V)+ = VW, the closure of V is deriving W from the remaining FD’s.
So, W is redundant. We can remove it.
So, the final canonical form is
V→W, V→X, Y→V, Y→Z
⇾ So, option (A) is correct.
Question 16 |
Consider a database that has the relation schema EMP (EmpId, EmpName, and DeptName). An instance of the schema EMP and a SQL query on it are given below.
The output of executing the SQL query is ___________.
2.6 | |
2.7 | |
2.8 | |
2.9 |

⇾ We start evaluating from the inner query.
The inner query forms DeptName wise groups and counts the DeptName wise EmpIds.
⇾ In inner query DeptName, Count(EmpId) is the alias name DeptName, Num.
So, the output of the inner query is,

The outer query will find the
Avg(Num) = (4+3+3+2+1)/5 = 2.6
Question 17 |
Consider a database that has the relation schemas EMP(EmpId, EmpName, DeptId), and DEPT(DeptName, DeptId). Note that the DeptId can be permitted to a NULL in the relation EMP. Consider the following queries on the database expressed in tuple relational calculus.
-
(I) {t│∃u ∈ EMP(t[EmpName] = u[EmpName] ∧ ∀v ∈ DEPT(t[DeptId] ≠ v[DeptId]))}
(II) {t│∃u ∈ EMP(t[EmpName] = u[EmpName] ∧ ∃v ∈ DEPT(t[DeptId] ≠ v[DeptId]))}
(III) {t│∃u ∈ EMP(t[EmpName] = u[EmpName] ∧ ∃v ∈ DEPT(t[DeptId] = v[DeptId]))}
Which of the above queries are safe?
(I) and (II) only | |
(I) and (III) only | |
(II) and (III) only | |
(I), (II) and (III) |
(I) Gives EmpNames who do not belong to any Department. So, it is going to be a finite number of tuples as a result.
(II) Gives EmpNames who do not belong to some Department. This is also going to have finite number of tuples.
(III) Gives EmpNames who do not belong to same Department. This one will also give finite number of tuples.
All the expressions I, II and III are giving finite number of tuples. So, all are safe.
Question 18 |
In a database system, unique timestamps are assigned to each transaction using Lamport’s logical clock. Let TS(T1) and TS(T2) be the timestamps of transactions T1 and T2 respectively. Besides, T1 holds a lock on the resource R and T2 has requested a conflicting lock on the same resource R. The following algorithm is used to prevent deadlocks in the database system assuming that a killed transaction is restarted with the same timestamp.
if TS(T2)<TS(T1) then T1 is killed else T2 waits.
Assume any transaction that is not killed terminates eventually. Which of the following is TRUE about the database system that uses the above algorithm to prevent deadlocks?
The database system is both deadlock-free and starvation-free. | |
The database system is deadlock-free, but not starvation-free. | |
The database system is starvation-free, but not deadlock-free. | |
The database system is neither deadlock-free nor starvation-free. |
So, there will be no equal timestamps.
Lamport’s logical clock:
In this timestamps are assigned in increasing order only.
According to the given algorithm,
TS(T2) < TS(T1)
then T1 is killed
else
T2 will wait
So, in both the cases, it will be deadlock free and there will be no starvation.
Question 19 |
Consider a database that has the relation schema CR(StudentName, CourseName). An instance of the schema CR is as given below.

The following query is made on the database.
T1 ← πCourseName(σStudentName='SA'(CR)) T2 ← CR ÷ T1
The number of rows in T2 is ____________.
4 | |
5 | |
6 | |
7 |
The σStudentName = 'SA'(CR) will produce the following

⇾ The result of T1 ← πCourseName(σStudentName='SA'(CR)) is

(2) T2 ← CR÷T1
⇾ We see that SA is enrolled for CA, CB and CC.
⇾ T2 will give the StudentNames those who have enrolled for all the CA, C, CC courses. So, the following Students are enrolled for the given 3 courses.

⇾ So, the output of T2 will have 4 rows.
Question 20 |
An ER model of a database consists of entity types A and B. These are connected by a relationship R which does not have its own attribute. Under which one of the following conditions, can the relational table for R be merged with that of A?
Relationship R is one-to-many and the participation of A in R is total. | |
Relationship R is one-to-many and the participation of A in R is partial. | |
Relationship R is many-to-one and the participation of A in R is total. | |
Relationship R is one-to-many and the participation of A in R is partial. |

The relational table for R be merged that of A, if the relationship R is Many-to-one and the participation of A in R is total.
Question 21 |

In table T1, P is the primary key and Q is the foreign key referencing R in table T2 with on-delete cascade and on-update cascade. In table T2, R is the primary key and S is the foreign key referencing P in table T1 with on-delete set NULL and on-update cascade. In order to delete record 〈3,8〉 from table T1, the number of additional records that need to be deleted from table T1 is _________.
0 | |
1 | |
2 | |
3 |

Therefore, no. of additional records deleted from the table T1 is 0 (zero).
Question 22 |
Two transactions T1 and T2 are given as
-
T1: r1(X)w1(X)r1(Y)w1(Y)
T2: r2(Y)w2(Y)r2(Z)w2(Z)
where ri(V) denotes a read operation by transaction Ti on a variable V and wi(V) denotes a write operation by transaction Ti on a variable V. The total number of conflict serializable schedules that can be formed by T1 and T2 is ____________.
54 | |
55 | |
56 | |
57 |
= 8!/(4×3×2×4×3×2)
= (8×7×6×5×4×3×2×1)/(4×3×2×4×3×2)
= 70
Following two conflict actions are possible:


∴# Permutations = 4 × 3 = 12

#permutations = 4 × 1 = 4
∴ Total no. of conflict serial schedules possible = 70 - 12 - 4 = 54
Question 23 |
Consider the following database table named top_scorer.

SELECT ta.player FROM top_scorer AS ta WHERE ta.goals > ALL (SELECT tb.goals FROM top_scorer AS tb WHERE tb.country = 'Spain') AND ta.goals > ANY (SELECT tc.goals FROM top_scorer AS tc WHERE tc.country = 'Germany')
The number of tuples returned by the above SQL query is _____.
7 | |
8 | |
9 | |
10 |

In the given database table top_scorer no players are there from ‘Spain’.
So, the query (1) results 0 and ALL (empty) is always TRUE.
The query (2) selects the goals of the players those who are belongs to ‘Germany’.
So, it results in ANY (16, 14, 11, 10).
So, the outer most query results the player names from top_scorer, who have more goals.
Since, the minimum goal by the ‘Germany’ player is 10, it returns the following 7 rows.

Question 24 |
In a B+ tree, if the search-key value is 8 bytes long, the block size is 512 bytes and the block pointer size is 2 bytes, then the maximum order of the B+ tree is _________.
52 | |
53 | |
54 | |
55 |
Block size = 512 bytes
Block pointer = 2 bytes
Search key = 8 bytes
Let Maximum order of B+ tree = n
n(Pb) + (n - 1)(k) ≤ 512
n(2) + (n - 1)(8) ≤ 512
2n + 8n - 8 ≤ 512
10n ≤ 520
n ≤ 520/10
(n = 52)
Question 25 |
Which of the following is NOT a superkey in a relational schema with attributes V, W, X, Y, Z and primary key VY?
VXYZ | |
VWXZ | |
VWXY | |
VWXYZ |
Any superset of “VY” is a super key. So, option (B) does not contain “Y”.
Question 26 |
NOT a part of the ACID properties of database transactions?
Atomicity | |
Consistency | |
Isolation | |
Deadlock-freedom |
So, Deadlock – freedom is not there in the ACID properties.
Question 27 |
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) → TITLE
(VOLUME, NUMBER) → YEAR
(VOLUME, NUMBER, STARTPAGE, ENDPAGE) → 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?
1NF | |
2NF | |
3NF | |
BCNF |
V – VOLUME
N – NUMBER
S – STARTPAGE
E – ENDPAGE
T – TITLE
Y – YEAR
P – PRICE
Primary key: (V, N, S, E)
FD set:
(V, N, S, E) → T
(V, N) → Y
(V, N, S, E) → P
In (V, N) → Y; V, N is a part of the key and Y is non-prime attribute.
So, it is a partial dependency.
Now, the schema “Journal” is in 1NF but not in 2NF.
The database is redesigned as follows:

Both R1 and R2 are in BCNF.
Therefore, 2NF is the weakest normal form that the new database satisfies, but the old one does not.
Question 28 |
Consider the following two phase locking protocol. Suppose a transaction T accesses (for read or write operations), a certain set of objects{O1,...,Ok}. This is done in the following manner:
-
Step1. T acquires exclusive locks to O1,...,Ok in increasing order of their addresses.
Step2. The required operations are performed.
Step3. All locks are released.
This protocol will
guarantee serializability and deadlock-freedom | |
guarantee neither serializability nor deadlock-freedom | |
guarantee serializability but not deadlock-freedom | |
guarantee deadlock-freedom but not serializability |
In conservative 2PL protocol, a transaction has to lock all the items before the transaction begins execution.
Advantages of conservative 2PLP:
• No possibility of deadlock.
• Ensure serializability.
The given scenario (Step1, Step2 and Step3) is conservative 2PLP.
Question 29 |
B+ Trees are considered BALANCED because
the lengths of the paths from the root to all leaf nodes are all equal. | |
the lengths of the paths from the root to all leaf nodes differ from each other by at most 1. | |
the number of children of any two non-leaf sibling nodes differ by at most 1. | |
the number of records in any two leaf nodes differ by at most 1. |
Question 30 |
Suppose a database schedule S involves transactions T1, ..., Tn. Construct the precedence graph of S with vertices representing the transactions and edges representing the conflicts. If S is serializable, which one of the following orderings of the vertices of the precedence graph is guaranteed to yield a serial schedule?
Topological order | |
Depth-first order | |
Breadth-first order | |
Ascending order of transaction indices |
But BFS and DFS are also potssible for cyclic graphs.
And topological sort is not possible for cyclic graph.
Moreover option (D) is also wrong because in a transaction with more indices might come before lower one.
Question 31 |
Consider the following database schedule with two transactions, T1 and T2.
-
S = r2(X); r1(X); r2(Y); w1(X); r1(Y); w2(X); a1; a2
where ri(Z) denotes a read operation by transaction Ti on a variable Z, wi(Z) denotes a write operation by Ti on a variable Z and ai denotes an abort by transaction Ti.
Which one of the following statements about the above schedule is TRUE?
S is non-recoverable | |
S is recoverable, but has a cascading abort | |
S does not have a cascading abort | |
S is strict |

Now let's check statements one by one,
A) False, because there is no dirty read. So, it is recoverable.
B) False, because there is to dirty read. So, no cascading aborts.
C) True.
D) False, because there is Transaction T2 which written the value of x which is written by T1 before T1 has aborted. So, not strict.
Question 32 |
Consider the following database table named water_schemes :

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
2 | |
3 | |
4 | |
5 |
The name assigned to the sub-query is treated as though it was an inline view or table.
• First group by district name is performed and total capacities are obtained as following:

• Then average capacity is computed, Average Capacity = (20 + 40 + 30 + 10)/4 = 100/4 = 25
• Finally, 3rd query will be executed and it's tuples will be considered as output, where name of district and its total capacity should be more than or equal to 25.
• Then average capacity is computed,
Average Capacity = (20 + 40 + 30 + 10)/4 = 100/4 = 25
• Finally, 3rd query will be executed and it's tuples will be considered as output, where name of district and its total capacity should be more than or equal to 25.

Question 33 |
the selection operation in relational algebra | |
the selection operation in relational algebra, except that SELECT in SQL retains duplicates
| |
the projection operation in relational algebra | |
the projection operation in relational algebra, except that SELECT in SQL retains duplicates
|
Question 34 |
4 | |
6 | |
7 | |
8 |


Question 35 |

SELECT S. Student_Name, sum(P.Marks) FROM Student S, Performance P WHERE S.Roll_No = P.Roll_No GROUP BY S.Student_NameThe number of rows that will be returned by the SQL query is _________
2 | |
3 | |
4 | |
5 |

Question 36 |
Atomicity | |
Consistency | |
Isolation | |
Durability |
Question 37 |

6 | |
7 | |
5 | |
9 |

Question 38 |
R contains a,b,e,f,g but not c, d.
| |
R contains all of a,b,c,d,e,f,g
| |
R contains e,f,g but not a,b
| |
R contains e but not f,g
|

⋆ So, from the above resultant table, R contains e, f, g only but not a, b.
Question 39 |
Undo T3, T1; Redo T2
| |
Undo T3, T1; Redo T2, T4
| |
Undo: none; redo: T2, T4, T3, T1
| |
Undo T3, T1; T4; Redo: T2
|
Question 40 |
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?
{P,R}→{S,T} | |
{P,R}→{R,T} | |
{P,S}→{S} | |
{P,S,U}→{Q} |
Question 41 |
Cinema (theater, address, capacity)Which of the following options will be needed at the end of the SQL query
SELECT P1. address FROM Cinema P1Such that it always finds the addresses of theaters with maximum capacity?
WHERE P1.capacity >= All (select P2.capacity from Cinema P2) | |
WHERE P1.capacity >= Any (select P2.capacity from Cinema P2) | |
WHERE P1.capacity > All (select max(P2.capacity) from Cinema P2) | |
WHERE P1.capacity > Any (select max(P2.capacity) from Cinema P2) |
So the theatres which are having maximum capacity will satisfy the condition.
Question 42 |
{E,F} | |
{E,F,H} | |
{E,F,H,K,L} | |
{E} |
B) (EFH)+ = EFHGIJKLMN, EFH is deriving all the attributes of R. So, EFH is a key.
C) If EFH is a key, then EFHKL will become the super key.
D) (E)+ = E
Question 43 |
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?
S1 is TRUE and S2 is FALSE. | |
Both S1 and S2 are TRUE. | |
S1 is FALSE and S2 is TRUE. | |
Both S1 and S2 are FALSE. |
Using a check constraint, we can have the same effect as foreign key while adding elements to the child table. But while deleting elements from the parent table the referential integrity constraint is no longer valid. So, a check constraint cannot replace a foreign key.
S2: False:
Foreign key in one table should be defined as a primary key in other table. In above table definition, table S has a foreign key that refers to field ‘a’ of R. The field ‘a’ in table S is part of the primary key and part of the key cannot be declared as a foreign key.
Question 44 |
r1 (x); r2 (x); w1 (x); r3 (x); w2 (x) | |
r2 (x);r1 (x);w2 (x);r3 (x);w1 (x) | |
r3 (x);r2 (x);r1 (x);w2 (x);w1 (x) | |
r2 (x);w2 (x);r3 (x);r1 (x);w1 (x) |

- Polygraph contains cycle. So, not a conflict serializable.
Option: B

-Cyclic
Option: C

- Cyclic
Option: D

- Acyclic, so conflict serializable.
Question 45 |
S1: Every table with two single-valued attributes is in 1NF, 2NF, 3NF and BCNF. S2: AB->C, D->E, E->C is a minimal cover for the set of functional dependencies AB->C, D->E, AB->E, E->C.Which one of the following is CORRECT?
S1 is TRUE and S2 is FALSE. | |
Both S1 and S2 are TRUE. | |
S1 is FALSE and S2 is TRUE. | |
Both S1 and S2 are FALSE. |
If we can prove the relation is in BCNF then by default it would be in 1NF, 2NF, 3NF also.
Let R(AB) be a two attribute relation, then
If {A→B} exists then BCNF since {A}+ = AB = R
If {B→A} exists then BCNF since {B}+ = AB = R
If {A→B, B→A} exists then BCNF since A and B both are Super Key now.
If {No non-trivial Functional Dependency} then default BCNF.
Hence it’s proved that a Relation with two single-valued attributes is in BCNF hence it’s also in 1NF, 2NF, 3NF.
S2: False
The canonical cover for the given FD set is {AB→C, D→E, AB→E, E→C}. As we can see AB→E is not covered in minimal cover since {AB}+ = ABC in the given cover {AB→C, D→E, E→C}
Question 46 |
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?
It executes but does not give the correct result. | |
It executes and gives the correct result. | |
It generates an error because of pairwise comparison. | |
It generates an error because the GROUP BY clause cannot be used with table joins in a subquery. |
Question 47 |
8 | |
9 | |
10 | |
11 |
Here, n = 4.
So, the possible super keys = 24-1 = 8
The super keys are: E, EH, EG, EF, EGH, EFH, EFG, EFGH.
Question 48 |

19 | |
20 | |
21 | |
22 |
Question 49 |

S is conflict-serializable but not recoverable | |
S is not conflict-serializable but is recoverable | |
S is both conflict-serializable and recoverable | |
S is neither conflict-serializable nor is it recoverable |

In the precedence graph, there are no cycles. So, it is conflict serializable and recoverable also.
Question 50 |
relation r(R) is in the outer loop. | |
relation s(S) is in the outer loop. | |
join selection factor between r(R) and s(S) is more than 0.5. | |
join selection factor between r(R) and s(S) is less than 0.5. |
For each tuple r in R do
For each tuple s in S do
If r and s satisfy the join condition then
output the tuple
The above algorithm involves (nr*bs+br)
block transfer and (nr+br) seeks.
where,
br → no. of blocks in R
bs → no. of blocks in S
hr → no. of tuples in R
To have less block accesses in nr should be less and in question it is given that size(r(R)) < size(s(S)).
To have fewer no. of disk block accesses the relation r(R) should be in outer loop.
Question 51 |
select * from R where a in (select S.a from S)
select R.* from R,S where R.a=S.a | |
select distinct R.* from R,S where R.a=S.a | |
select R.* from R,(select distinct a from S) as S1 where R.a=S1.a | |
select R.* from R,S where R.a=S.a and is unique R |
Question 52 |
πA1 (σ(F1∧F2) (r)) | |
πA1 (σ(F1∨F2) (r)) | |
πA2 (σ(F1∧F2) (r)) | |
πA2 (σ(F1∨F2) (r)) |
Two Selects with Boolean expression can be combined into one select with AND of two Boolean expressions.
Question 53 |
in all candidate keys of R. | |
in some candidate key of R. | |
in a foreign key of R. | |
only in the primary key of R . |
Ex: AB, BC, CD are candidate keys of R(ABCD). In the FDs set one attribute may not be part of all the FDs.
Question 54 |
some dependent. | |
all dependents. | |
some of his/her dependents. | |
all of his/her dependents. |
Question 55 |
Names of all the employees with at least one of their customers having a ‘GOOD’ rating. | |
Names of all the employees with at most one of their customers having a ‘GOOD’ rating. | |
Names of all the employees with none of their customers having a ‘GOOD’ rating. | |
Names of all the employees with all their customers having a ‘GOOD’ rating. |

The inner query i.e., ② represents all customers having other than ‘GOOD’ while the entire query represents name of all employees with all their customers having a ‘good rating’.
Question 56 |
it is on a set of fields that form a candidate key. | |
it is on a set of fields that include the primary key. | |
the data records of the file are organized in the same order as the data entries of the index. | |
the data records of the file are organized not in the same order as the data entries of the index. |
Basically, Indexed column is used to sort the rows of table. Whole data record of file is sorted using index so the correct option is (C).
Question 57 |
I, II, III and IV | |
I, II and III only | |
I, II and IV only | |
II, III and IV only |
Question 58 |
3 | |
4 | |
5 | |
6 |
Now D+ = {D}.
Hence we have to add A,B,C,E,F,G,H to D and check which of them are Candidate keys of size 2.
AD+ = {ABCDEFGH}
BD+ = {ABCDEFGH}
ED+ = {ABCDEFGH}
FD+ = {ABCDEFGH}
But CD+, GD+ and HD+ does not give all the attributes hence CD, GD and HD are not candidate keys.
Hence no. of candidate keys are 4: AD, BD, ED, FD.
Question 59 |
in 1NF, but not in 2NF. | |
in 2NF, but not in 3NF. | |
in 3NF, but not in BCNF. | |
in BCNF. |
Now D+ = {D}.
Hence we have to add A,B,C,E,F,G,H to D and check which of them are Candidate keys of size 2.
AD+ = {ABCDEFGH}
BD+ = {ABCDEFGH}
ED+ = {ABCDEFGH}
FD+= {ABCDEFGH}
But CD+, GD+ and HD+ does not give all the attributes hence CD, GD and HD are not candidate keys.
Here Candidate keys are AD, BD, ED and FD.
A → BC, B → CFH and F → EG etc are partial dependencies.
So given relation is in 1NF, but not in 2NF.
Question 60 |
Every relation in 3NF is also in BCNF | |
A relation R is in 3NF if every non-prime attribute of R is fully functionally dependent on every key of R | |
Every relation in BCNF is also in 3NF | |
No relation can be in both BCNF and 3NF |
Question 61 |
An attribute of an entity can have more than one value | |
An attribute of an entity can be composite | |
In a row of a relational table, an attribute can have more than one value | |
In a row of a relational table, an attribute can have exactly one value or a NULL value |
Option (B): In ER model, the attribute which can be further broken down into some other attributes is called composite attribute.
Option (C): In Relational model, the intersection of one row and column should contain only one value. So, option (C) is INCORRECT.
Option (D): In Relational model, the intersection of one row and column should contain either exactly one value or NULL.
Question 62 |
P and R | |
P and S | |
Q and R | |
Q and S |
The HAVING Clause enables you to specify conditions that filter which group results appear in the results. The WHERE clause places conditions on the selected columns, whereas the HAVING clause places conditions on groups created by the GROUP BY clause. So, we cannot use HAVING clause without GROUP BY clause.
Question 63 |
T1: read (P) ; read (Q) ; if P = 0 then Q : = Q + 1 ; write (Q) ; T2: read (Q) ; read (P) ; if Q = 0 then P : = P + 1 ; write (P) ;Any non-serial interleaving of T1 and T2 for concurrent execution leads to
a serializable schedule | |
a schedule that is not conflict serializable | |
a conflict serializable schedule | |
a schedule for which a precedence graph cannot be drawn |

The above schedule is not conflict serializable.
Question 64 |
∏B (r1) - ∏C (r2) = ∅ | |
∏C (r2) - ∏B (r1) = ∅ | |
∏B (r1) = ∏C (r2) | |
∏B (r1) - ∏C (r2) ≠ ∅ |
So we can say that r2(C) is the superset of r1(B).
So (subset - superset) is always empty.
Question 65 |





7 | |
4 | |
5 | |
9 |


Performs the cross product and selects the tuples whose A∙Id is either greater than 40 or C∙Id is less than 15. It yields:

Question 66 |

SELECT A.id FROM A WHERE A.age > ALL (SELECT B.age FROM B WHERE B. name = "arun")
4 | |
3 | |
0 | |
1 |

First query (2) will be executed and 0 (no) rows will be selected because in relation B there is no Name ‘Arun’.
The outer query (1) results the follow and that will be the result of entire query now. (Because inner query returns 0 rows).

Question 67 |
1. Registration_Num: Unique registration number of each registered student 2. UID: Unique identity number, unique at the national level for each citizen 3. BankAccount_Num: Unique account number at the bank. A student can have multiple accounts or join accounts. This attribute stores the primary account number. 4. Name: Name of the student 5. Hostel_Room: Room number of the hostel Which one of the following option is INCORRECT?
BankAccount_Num is a candidate key | |
Registration_Num can be a primary key
| |
UID is a candidate key if all students are from the same country | |
If S is a superkey such that S∩UID is NULL then S∪UID is also a superkey |
Question 68 |

Ordered indexing will always outperform hashing for both queries | |
Hashing will always outperform ordered indexing for both queries | |
Hashing will outperform ordered indexing on Q1, but not on Q2 | |
Hashing will outperform ordered indexing on Q2, but not on Q1. |
For example, consider B+ tree, once you have searched a key in B+; you can find range of values via the block pointers pointing to another block of values on the leaf node level.
Question 69 |
Borrower Bank_Manager Loan_Amount Ramesh Sunderajan 10000.00 Suresh Ramgopal 5000.00 Mahesh Sunderajan 7000.00What is the output of the following SQL query?
SELECT Count(*) FROM ( ( SELECT Borrower, Bank_Manager FROM Loan_Records) AS S NATURAL JOIN ( SELECT Bank_Manager, Loan_Amount FROM Loan_Records) AS T );
3 | |
9 | |
5 | |
6 |

Question 70 |
SELECT Y FROM T WHERE X=7;`
127
| |
255 | |
129 | |
257 |

Question 71 |
1 | |
2 | |
3 | |
4 |
― Here,
p = order
key = order – 1 = p – 1
― In the non-root node, the minimum no. of keys =⌈p/2⌉-1
― So, key = 5
order = 6
― So, minimum no. of keys in root node =⌈6/2⌉-1=2
Question 72 |
Table: Passenger pid pname age ----------------- 0 Sachin 65 1 Rahul 66 2 Sourav 67 3 Anil 69 Table : Reservation pid class tid --------------- 0 AC 8200 1 AC 8201 2 SC 8201 5 AC 8203 1 SC 8204 3 AC 8202What pids are returned by the following SQL query for the above instance of the tables?
SLECT pid FROM Reservation , WHERE class ‘AC’ AND EXISTS (SELECT * FROM Passenger WHERE age > 65 AND Passenger. pid = Reservation.pid)
1, 0 | |
1, 2 | |
1, 3 | |
1, 5 |

― 1, 3 Pids are returned
Question 73 |
I only
| |
II only | |
Both I and II | |
Neither I nor II |
― Timestamp ordering protocol ensures conflict serializability and free from deadlock.
Question 74 |

T1 → T3 → T2 | |
T2 → T1 → T3 | |
T2 → T3 → T1 | |
T3 → T1 → T2 |

― Precedence graph for the above schedule is,

― From the precedence graph the correct serialization is,

Question 75 |
B -> A A -> CThe relation R contains 200 tuples and the rel ation S contains 100 tuples. What is the maximum number of tuples possible in the natural join of R and S (R natural join S)
100 | |
200 | |
300 | |
2000 |
R(A, B, C) – 200 tuples
S(B, D, E) – 100 tuples
FD’s:
B → A
A → C
― ‘B’ is primary key for R and foreign key of S from the given FDs.
― Maximum tuples in natural join of R and S is min(200, 100) = 100.
Question 76 |

S1 and S2 | |
S2 and S3 | |
S3 only
| |
S4 only |

Dependency graph is,

So, there is no cycle.
Schedule S3,

Dependency graph is,

S4 also has a cycle T1→T2 and T2→T1.
So, S2 and S3 are conflict serializable.
Question 77 |
2 | |
3 | |
4 | |
5 |

Insert 3:

Insert 6:

Insert 4:

Insert 2:

Insert 1:

So, total splits are 3.
Question 78 |

I and II
| |
I and III
| |
II and IV | |
III and IV |
S={c}

It looks like Division operator. Since a division operator in E(A,B)/ P(B) will be equal to

Now replacing A=R-S P=r
B=S
E=r
we will get,

equivalent to I
∴ It is equivalent to division operator.
⇒ r(R-S,S)/r(S)

This logical statement means that
① Select t(R-S) from r such that
② for all tuples U in S,
③ there exists a tuple V in r, such that
④ U=V[S] & t=V[R-S]
A(x,y) & B(y)
A/B = {(x) | ∃(x,y)∈A(y)∈B}
which means that A/B contains all x tuples, such that for every tuple in B, there is an xy tuple in A.
So, this is just equivalent to I.

This logical statement means that
① Select t(R-S) from r such that
② for all tuples V in r,
③ there exists a tuple U in r, such that
④ U=V[S] & t=V[R-S]
⇒ Select (R-S) values from r, where the S value is in (r/r), which will be true only if S in r is a foreign key referring to S is r.

This selects (a,b) from all tuples from r which has an equivalent value in S.
Question 79 |
Find the names of all suppliers who have supplied a non-blue part.
| |
Find the names of all suppliers who have not supplied a non-blue part. | |
Find the names of all suppliers who have supplied only blue parts.
| |
Find the names of all suppliers who have not supplied only blue parts.
|



If we execute the given query the output will be S3 and S4 i.e., names of all suppliers who didn’t supply blue parts which is option (A).
Option (D) says names of suppliers who didn’t supply only blue parts that means, supplier should supply all other parts for sure and shouldn’t supply blue part.
Question 80 |
The schema is in BCNF | |
The schema is in 3NF but not in BCNF
| |
The schema is in 2NF but not in 3NF | |
The schema is not in 2NF |
(Sid, Street) → Sname
As Sid is a primary key, then
(Sid, Street) will be super key.
Hence, it is in BCNF.
Question 81 |
I only | |
II only | |
III only | |
III and IV only |
∀xP(x)≡∼∃x(∼P(x))
∼∀x(∼P(x))≡∃x(P(x))
Given: ∀t ∈ r(P(t))------ (1)
As per Demorgan law
(1) ⇒ ∼∃t ∈ r(∼P(t))
which is option (III).
Question 82 |
non-key and ordering
| |
non-key and non-ordering
| |
key and ordering
| |
key and non-ordering
|
Question 83 |
3 | |
4 | |
5 | |
6 |
{1,2,3,...,10} which can cause maximum possi ble splits.
1, 2, 3 →

4 →

5 →

6 →

7 →

8 →

9 →

10 →

Question 84 |
Only I and II
| |
Only I and III
| |
Only I, II and III | |
Only I, III and IV |
We have two common columns in 'R' and 'S' which are 'P' and 'Q'.
(I) Both P and Q are used while doing the join, i.e., both P and Q are used to filter.
(II) Q is not used here for filtering. Natural join is done on all P's from R and all P's from S. So different from option (I).
(III) Through venn diagram it can be proved that A∩B = A - (A-B).
So through above formula we can say that (III) and (IV) are equivalent.
So finally (I), (III) and (IV) are equivalent.
Question 85 |
Both Book and Collection are in BCNF
| |
Both Book and Collection are in 3NF only
| |
Book is in 2NF and Collection is in 3NF
| |
Both Book and Collection are in 2NF only
|
Book(Title, Author, Catalog_no, Publisher, Year, Price)
Collection(Title, Author, Catalog_no)
I) Title Author ⟶ Catalog_no ⟶ BCNR
II) Catalog_no ⟶ Title, Author, Publisher, Year ⟶ 3NF
III) Publisher Title Year ⟶Price ⟶ 2NF Book’s in 2NF
Collection is in 3NF.
Question 86 |
8 and 0 | |
128 and 6 | |
256 and 4
| |
512 and 5 |
Record size = 32 bytes
Key size = 6 bytes
Block pointer size = 10 bytes
Block size of file system = 1024 bytes
Record (or) index entry size = 10+6 = 16 bytes
In first level no. of blocks =No. of records in a file/Block size=16384 * 16/1024=256
In second level, it have = 256*16 entries
In second level, no. of blocks =No. of entries/Block size =256*16/1024=4
Question 87 |

2 | |
3 | |
4 | |
5 |
➝ Here N is a Weak entity, but it need to modify the primary key of P such as P1
M = {M1, M2, M3, P1}
P = {P1, P2}
N = {N1, N2, P1}
➝ Relationship set has its own attribute, then no need to create a separate table.
➝ Finally we require 3 minimum tables to represent M,P,N,R1,R2.
Question 88 |

{M1, M2, M3, P1} | |
{M1, P1, N1, N2}
| |
{M1, P1, N1} | |
{M1, P1}
|
For M = {M1, M2, M3, P1}
P = {P1, P2}
N = {N1, N2, P1}
Question 89 |
A → B, B → C, C → D and D → B. The decomposition of R into (A, B), (B, C), (B, D)
gives a lossless join, and is dependency preserving | |
gives a lossless join, but is not dependency preserving | |
does not give a lossless join, but is dependency preserving | |
does not give a lossless join and is not dependency preserving
|
(A, B, C) (B, D) - common attributes is B and B→D is a FD (via B→C, C→D), and hence, B is a key for (B, D). So, decomposition of (A, B, C, D) into (A, B, C) (B, D) is lossless.
Thus the given decomposition is lossless.
The given decomposition is also dependency preserving as the dependencies A→B is present in (A, B), B→C is present in (B, C), D→B is present in (B, D) and C→D is indirectly present via C→B in (B, C) and B→D in (B, D).
Question 90 |
in BCNF | |
in 3NF, but not in BCNF | |
in 2NF, but not in 3NF | |
not in 2NF |
Since there is a partial dependency B→G.
So the relational schema R is Not in 2NF.
Question 91 |
(S1) 2RA 2WA 3RC 2WB 3WA 3WC 1RA 1RB 1WA 1WB (S2) 3RC 2RA 2WA 2WB 3WA 1RA 1RB 1WA 1WB 3WC (S3) 2RA 3RC 3WA 2WA 2WB 3WC 1RA 1RB 1WA 1WBWhich of the following statements is TRUE?
S1, S2 and S3 are all conflict equivalent to each other | |
No two of S1, S2 and S3 are conflict equivalent to each other | |
S2 is conflict equivalent to S3, but not to S1 | |
S1 is conflict equivalent to S2, but not to S3 |
For S1:

For S2:

For S3:

Hence, S1 is conflict equivalent to S2, but not to S3.
Question 92 |
SELECT sch-name, COUNT (*) FROM School C, Enrolment E, ExamResult R WHERE E.school-id = C.school-id AND E.examname = R.examname AND E.erollno = R.erollno AND R.marks = 100 AND S.school-id IN (SELECT school-id FROM student GROUP BY school-id HAVING COUNT (*) > 200) GROUP By school-id /* Add code here. Remove these lines if not writing code */ |
for each school with more than 200 students appearing in exams, the name of the school and the number of 100s scored by its students | |
for each school with more than 200 students in it, the name of the school and the number of 100s scored by its students | |
for each school with more than 200 students in it, the name of the school and the number of its students scoring 100 in at least one exam | |
nothing; the query has a syntax error
|
Question 93 |
SELECT sch-name, COUNT (*) FROM School C, Enrolment E, ExamResult R WHERE E.school-id = C.school-id AND E.examname = R.examname AND E.erollno = R.erollno AND R.marks = 100 AND S.school-id IN (SELECT school-id FROM student GROUP BY school-id HAVING COUNT (*) > 200) GROUP By school-id /* Add code here. Remove these lines if not writing code */ |
The empty set | |
schools with more than 35% of its students enrolled in some exam or the other | |
schools with a pass percentage above 35% over all exams taken together | |
schools with a pass percentage above 35% over each exam |
{ x | x ∈ Enrolment ∧ x . school-id = t } | * 100 > 35 }
This is school with enrollment % is 35 or above.
Question 94 |

Courses in which all the female students are enrolled.
| |
Courses in which a proper subset of female students are enrolled.
| |
Courses in which only male students are enrolled.
| |
None of the above
|
Option B: Yes, True. It selects the proper subset of female students which are enrolled because in the expression we are performing the cartesian product.
Option C: False. It doesn’t shows (or) display the males students who are enrolled.
Question 95 |

Names of employees with a male supervisor.
| |
Names of employees with no immediate male subordinates. | |
Names of employees with no immediate female subordinates. | |
Names of employees with a female supervisor.
|
Question 96 |
Any relation with two attributes is in BCNF | |
A relation in which every key has only one attribute is in 2NF
| |
A prime attribute can be transitively dependent on a key in a 3NF relation | |
A prime attribute can be transitively dependent on a key in a BCNF relation |
i) It is in 3NF.
ii) For any dependency X→ Y
where X is a super key.
iii) Functional dependency has been removed.
Option D is false.
→ Because a prime attribute can’t be transitive dependent on a key in a BCNF relation.
Question 97 |
63 | |
64 | |
67 | |
68 |
Data recorder pointer size, r = 7 bytes
Value size, v = 9 bytes
Disk Block pointer, P = 6 bytes
⇒ Order of leaf be m, then
r*m+v*m+p <= 1024
7m+9m+6 <= 1024
16m <= 1024 - 6
m <= 63
Question 98 |

Both S1 and S2 are conflict serializable.
| |
S1 is conflict serializable and S2 is not conflict serializable. | |
S1 is not conflict serializable and S2 is conflict serializable.
| |
Both S1 and S2 are not conflict serializable.
|

In precedence graph of S1 since cycle is formed so not conflict serializable.
But in precedence graph of S2 No cycle is formed so it is conflict serializable.
Question 99 |
Consider a selection of the form σA≤100(r), where r is a relation with 1000 tuples. Assume that the attribute values for A among the tuples are uniformly distributed in the interval [0, 500]. Which one of the following options is the best estimate of the number of tuples returned by the given selection query ?
50 | |
100 | |
150 | |
200 |
Values for A among the tuples are uniformly distributed in the interval [0, 500]. This can be split to 5 mutually exclusive and exhaustive intervals of same width of 100 ([0-100], [101-200], [201-300], [301-400], [401-500], 0 makes the first interval larger - this must be typ0 in this question) and we can assume all of them have same number of values due to uniform distribution. So no. of tuples with A value in first interval should be,
Total no. of tuples/5 = 1000/5 = 200
Question 100 |
![]() | |
![]() | |
![]() | |
![]() |
i) Exclusive locks should be released after the commit.
ii) No locking can be done after the first unlock.
(A) Wrong because to write x you need Exclusive Lock.
(B) Wrong because violating the 1st requirement.
(C) Correct.
(D) Wrong because violating the 1st requirement.
Question 101 |
0 | |
1 | |
2 | |
3 |
if A→B then A→→B holds but reverseis not true.
So,
(i) False.
(ii) True.
(iii) False.
(iv) True.
Question 102 |
-
- b-Schema = (b-name, b-city, assets)
- a-Schema = (a-num, b-name, bal)
- d-Schema = (c-name, a-number)
Пc-name (σbal < 0 (σb-city = “Agra” branch ⋈ account) ⋈ depositor) | |
Пc-name (σb-city = “Agra”branch ⋈ (σbal < 0 account ⋈ depositor)) | |
Пc-name (σb-city = “Agra” branch ⋈ σb-city = “Agra” ⋀ bal < 0 account) ⋈ depositor) | |
Пc-name (σb-city = “Agra” ⋀ bal < 0 account ⋈ depositor)) |
Options (C) and (D) are invalid as there is no b-city column in a-schema.
Question 103 |
1 | |
2 | |
3 | |
4 |
After inserting K15 we get,

Now, we insert K25, which gives

So, we see in the final tree only (K20, K25) is present. Hence, 1 (Answer).
Question 104 |
Statements (i) and (ii) are true | |
Statements (ii) and (iii) are true | |
Statements (iii) and (i) are true | |
All the statements are false |

Now after deleting 50 we get B+ tree as

Hence, correct statement is only (i) & (ii).
Question 105 |
1. T1 start 2. T1 B old=12000 new=10000 3. T1 M old=0 new=2000 4. T1 commit 5. T2 start 6. T2 B old=10000 new=10500 7. T2 commitSuppose the database system crashes just before log record 7 is written. When the system is restarted, which one statement is true of the recovery procedure?
We must redo log record 6 to set B to 10500.
| |
We must undo log record 6 to set B to 10000 and then redo log records 2 and 3.
| |
We need not redo log records 2 and 3 because transaction T1 has committed.
| |
We can apply redo and undo operations in arbitrary order because they are idempotent.
|
So from above theory we can say that option (B) is the correct answer.
Question 106 |
Consider the relation enrolled(student, course) in which (student, course) is the primary key, and the relation paid(student, amount), where student is the primary key. Assume no null values and no foreign keys or integrity constraints. Assume that amounts 6000, 7000, 8000, 9000 and 10000 were each paid by 20% of the students. Consider these query plans (Plan 1 on left, Plan 2 on right) to "list all courses taken by students who have paid more than x".
A disk seek takes 4ms, disk data transfer bandwidth is 300 MB/s and checking a tuple to see if amount is greater than x takes 10 micro-seconds. Which of the following statements is correct?
Plan 1 and Plan 2 will not output identical row sets for all databases.
| |
A course may be listed more than once in the output of Plan 1 for some databases.
| |
For x = 5000, Plan 1 executes faster than Plan 2 for all databases.
| |
For x = 9000, Plan I executes slower than Plan 2 for all databases.
|
While analyze the plan1 and plan2 does lesser number of comparisons compared to plan1.
i) The join table consists of two tables will have more rows. So comparisons are needed to find amount greater than x.
ii) Join operation consists of more number of comparisons as the second table will have more rows in plan2 compared to plan1.
Question 107 |
ABWhich one of the following options is false?CD, AF
D, DE
F, C
G , F
E, G
A
{CF}+ = {ACDEFG} | |
{BG}+ = {ABCDG}
| |
{AF}+ = {ACDEFG} | |
{AB}+ = {ABCDFG}
|
AF → D
DE → F
C → G
F → E
G → A
CF+ = {G,E,A,D,C,F} = {A,C,D,E,F,G} (✔️)
BG+ = {B,G,A,C,D} = {A,B,C,D,G} (✔️)
AF+ = {D,E,A,F} = {A,D,E,F} (❌)
AB+ = {A,B,C,D,G} (❌)
Question 108 |
Query1: select A.customer, count(B.customer) from account A, account B where A.balance <=B.balance group by A.customer Query2: select A.customer, 1+count(B.customer) from account A, account B where A.balance < B.balance group by A.customerConsider these statements about Query1 and Query2.
1. Query1 will produce the same row set as Query2 for some but not all databases. 2. Both Query1 and Query2 are correct implementation of the specification 3. Query1 is a correct implementation of the specification but Query2 is not 4. Neither Query1 nor Query2 is a correct implementation of the specification 5. Assigning rank with a pure relational query takes less time than scanning in decreasing balance order assigning ranks using ODBC.Which two of the above statements are correct?
2 and 5
| |
1 and 3
| |
1 and 4
| |
3 and 5
|
The customer with largest balance gets rank 1. Ties are broken with ranks are skipped.
So, both queries may doesn’t give same output. Statement 4 is correct.
Question 109 |
Query1: select student from enrolled where student in (select student from paid) Query2: select student from paid where student in (select student from enrolled) Query3: select E.student from enrolled E, paid P where E.student = P.student Query4: select student from paid where exists (select * from enrolled where enrolled.student = paid.student)Which one of the following statements is correct?
All queries return identical row sets for any database.
| |
Query2 and Query4 return identical row sets for all databases but there exist databases for which Query1 and Query2 return different row sets.
| |
There exist databases for which Query3 returns strictly fewer rows than Query2.
| |
There exist databases for which Query4 will encounter an integrity violation at runtime.
|

Query1 : Output
abcd
abcd
PQRS
Query 2 : Output
abcd
PQRS
Query 3 : Output
abcd
PQRS
Query 4 : Output
abcd
PQRS
Query 2 & Query 4 gives same results but Query 1 & Query 3 gives different results.
Question 110 |
Consider the relations r1(P, Q, R) and r2(R, S, T) with primary keys P and R respectively. The relation r1 contains 2000 tuples and r2 contains 2500 tuples. The maximum size of the join r1⋈ r2 is :
2000 | |
2500 | |
4500 | |
5000 |
Question 111 |
- Relational algebra
- Tuple relational calculus restricted to safe expressions
- Domain relational calculus restricted to safe expressions
2 and 3 only | |
1 and 2 only | |
1 and 3 only | |
1, 2 and 3 |
Question 112 |
In a database file structure, the search key field is 9 bytes long, the block size is 512 bytes, a record pointer is 7 bytes and a block pointer is 6 bytes. The largest possible order of a non-leaf node in a B+ tree implementing this file structure is
23 | |
24 | |
34 | |
44 |
n × p + (n - 1) × k ≤ B (for non-leaf node)
Here, n = order, p = tree/block/index pointer, B = size of block
So,
n × p + (n - 1) × k ≤ B
n × 6 + (n - 1) × 9 ≤ 512
n ≤ 34.77
∴ n = 34
Question 113 |
VXZ | |
VXY | |
VWXY | |
VWXYZ |
Candidate keys are
VXY, WXY, ZXY
Question 114 |


Karthikeyan, Boris | |
Sachin, Salman | |
Karthikeyan, Boris, Sachin | |
Schumacher, Senna
|
did = {22, 22, 31, 31, 64}
For colour = "Green"
did = {22, 31, 74}
Intersection of Red and Green will be = {22, 31}, which is Karthikeyan and Boris.
Question 115 |

36 - 40 | |
44 - 48 | |
60 - 64 | |
100 - 104 |
red did : 22, 31, 64
green did : 22, 31, 74
(6) for intersection
(1) for searching 22 in driver relation, and (3) for searching 31.
Total: 38 + 6 + 4 = 48
Question 116 |
AE, BE
| |
AE, BE, DE
| |
AEH, BEH, BCH | |
AEH, BEH, DEH |
So only option (D) contains E and H as part of candidate key.
Question 117 |
select title from book as B where (select count(*) from book as T where T.price > B.price) < 5
Titles of the four most expensive books
| |
Title of the fifth most inexpensive book
| |
Title of the fifth most expensive book
| |
Titles of the five most expensive books
|
The where clause of outer query will be true for 5 most expensive books.
Question 118 |
A C ----- 2 4 3 4 4 3 5 2 7 2 9 5 6 4The set of all tuples that must be additionally deleted to preserve referential integrity when the tuple (2,4) is deleted is:
(3,4) and (6,4) | |
(5,2) and (7,2)
| |
(5,2), (7,2) and (9,5)
| |
(3,4), (4,3) and (6,4)
|
Totally (5,2), (7,2), (9,5) are also deleted.
Question 119 |
s ⊂ r
| |
r ∪ s = r
| |
r ⊂ s | |
r * s = s
|
Table r: R(A, B, C, D)

Table r1: ΠA,B,C(R)

Table r2: ΠA,D(R)

S = r1 * r2 (* denotes natural join)
Table S:

Table r ⊂ Table S
⇒ r ⊂ S
Question 120 |
Database relations have a large number of records | |
Database relations are sorted on the primary key
| |
B+- trees require less memory than binary search trees
| |
Data transfer from disks is in blocks |
Thus, the data can be transferred through blocks in B+ trees. This can be used for indexing the database relations.
Question 121 |
BCNF is stricter than 3NF
| |
Lossless, dependency-preserving decomposition into 3NF is always possible
| |
Lossless, dependency-preserving decomposition into BCNF is always possible | |
Any relation with two attributes is in BCNF
|
Option B: Lossless, dependency preserving decomposition into 3NF is always possible.
Option C: It is false.
It is not possible to have dependency preserving in BCNF decomposition.
→ Let take an example, 3NF can't be decomposed into BCNF.
Option D: It is true.
Let consider t wo attributes (X, Y).
If (X→Y), X is a candidate key. It is in BCNF and vice-versa.
Question 122 |

Person | |
Hotel Room | |
Lodging | |
None of these |
Question 123 |
1 NF | |
2 NF | |
3 NF | |
None |
F2 → F4 ......(ii)
(F1⋅F2) → F5 .....(iii)
F1F2 is the candidate key.
F1 and F2 are the prime key.
In (i) and (ii) we can observe that the relation from P → NP which is partial dependency. So this is in 1NF.
Question 124 |
5 | |
4 | |
3 | |
2 |
Here, the tree has 4 levels, then 4+1=5 nodes to be present in the newly created process.
Question 125 |
T1 |
Update salesinfo Set commission = commission * 1.02 Where commission < = 50000; |
T2 |
Update salesinfo Set commission = commission * 1.04 Where commission > 50000 and commission is < = 100000; |
T3 |
Update salesinfo Set commission = commission * 1.06 Where commission > 100000; |
Execute T1 followed by T2 followed by T3 | |
Execute T2, followed by T3; T1 running concurrently throughout | |
Execute T3 followed by T2; T1 running concurrently throughout | |
Execute T3 followed by T2 followed by T1
|
In other cases some people will get two times increment, for example,
if we have T1 followed by T2 and if initial commission is 49500, then he is belonging to <50000.
Hence, 49500 * 1.02 = 50490.
Now again he is eligible for second category. So, he will get again increment as,
50490 * 1.04 = 52509.6
So he will get increment two times, but he is eligible for only one slab of commission.
Question 126 |
ROLL | NAME | HOSTEL | MARKS |
---|---|---|---|
1798 | Manoj Rathod | 7 | 95 |
2154 | Soumic Banerjee | 5 | 68 |
2369 | Gumma Reddy | 7 | 86 |
2581 | Pradeep Pendse | 6 | 92 |
2643 | Suhas Kulkarni | 5 | 78 |
2711 | Nitin Kadam | 8 | 72 |
2872 | Kiran Vora | 5 | 92 |
2926 | Manoj Kunkalikar | 5 | 94 |
2959 | Hemant Karkhanis | 7 | 88 |
3125 | Rajesh Doshi | 5 | 82 |
ROLL | HOBBYNAME |
---|---|
1798 | chess |
1798 | music |
2154 | music |
2369 | swimming |
2581 | cricket |
2643 | chess |
2643 | hockey |
2711 | volleyball |
2872 | football |
2926 | cricket |
2959 | photography |
3125 | music |
3125 | chess |
select hostel from student natural join hobby where marks > = 75 and roll between 2000 and 3000;Relations S and H with the same schema as those of these two tables respectively contain the same information as tuples. A new relation S’ is obtained by the following relational algebra operation: S’ = ∏hostel ((σs.roll = H.roll (σmarks > 75 and roll > 2000 and roll < 3000 (S)) X (H)) The difference between the number of rows output by the SQL statement and the number of tuples in S’ is
6 | |
4 | |
2 | |
0 |

Total 7 rows are selected.
Where in relational algebra only distinct values of hostels are selected,i.e., 5, 6, 7 (3 rows).
∴ Answer is 7 - 3 =4
Question 127 |
Select distinct STMP.supplierid From Supply as STMP Where not unique (Select ITMP.supplierid From Inventory, Supply as ITMP Where STMP.supplierid = ITMP.supplierid And ITMP.itemcode = Inventory.itemcode And Inventory.warehouse = 'Nagpur');For the warehouse at Nagpur, this query will find all suppliers who
do not supply any item | |
supply exactly one item | |
supply one or more items | |
supply two or more items |
Question 128 |
CD → AC | |
BD → CD | |
BC → CD | |
AC → BC |
Option (B):
BD → CD
BD+ = BD
i.e., BD cannot derive CD and hence is not implied.
Question 129 |
800000 | |
40080 | |
32020 | |
100 |
Therefore,
putting 2nd table outside,
for every 400 records {
80 block accesses in first table
}
= 32000 blocks
and also 20 blocks accesses of outer table.
So, answer comes out to be,
32000 + 20 = 32020
Question 130 |
0 | |
30400 | |
38400 | |
798400 |
400×80+20
= 32020 (calculated in previous question)
In block Nested loop join, the no. of block access will be
20×80+20 = 1620
∴ The difference is = 32020 - 1620 = 30400
Question 131 |
Let R1 (A, B, (D)) and R2 (D, E) be two relation schema, where the primary keys are shown underlined, and let C be a foreign key in R1 referring to R2. Suppose there is no violation of the above referential integrity constraint in the corresponding relation instances r1 and r2. Which one of the following relational algebra expressions would necessarily produce an empty relation?
ΠD(r2) - ΠC(r1)
| |
ΠC(r1) - ΠD(r2)
| |
ΠD(r1⨝C≠Dr2)
| |
ΠC(r1⨝C=Dr2)
|
→ Based on referral integrity C is subset of values in R2 then,
ΠC(r1) - ΠD(r2) results empty relation.
Question 132 |
8, 8 | |
120, 8
| |
960, 8
| |
960, 120 |
→ In the question only enroll Id's are same with the student table.
→ The no. of minimum and maximum tuples is same i.e., 8, 8.
Question 133 |
2 NF
| |
3 NF
| |
BCNF
| |
4NF
|
name, courseNo → grade →(I)
rollNo, courseNo → grade →(II)
name → rollNo →(III)
rollNo → name →(IV)
Candidate keys: name, courseNo (or) rollNo
Its is not BCNF, because the relation III, there is no relationship from super key.
name → rollNo
It is not BCNF, name is not super key.
It belongs to 3NF, because if X→Y, Y is prime then it is in 3NF.
Question 134 |
names of girl students with the highest marks
| |
names of girl students with more marks than some boy student
| |
names of girl students with marks not less than some boy students
| |
names of girl students with more marks than all the boy students
|
Question 135 |
24 | |
25 | |
26 | |
27 |
Child pointer = 6 bytes
key size = 14 bytes
Block size = 512 bytes
⇒ 512 = (n-1)14 + n(6)
512 = 20n - 14
n = 512+14/20 = 526/20 = 26.3
∴ n = 26
Question 136 |
the average salary is more than the average salary in the company
| |
the average salary of male employees is more than the average salary of all male employees in the company
| |
the average salary of male employees is more than the average salary of employees in the same department
| |
the average salary of male employees is more than the average salary in the company
|
This results the employees who having the salary more than the average salary.
Sex = M
Selects the Male employees whose salary is more than the average salary in the company.
Question 137 |
Page | |
Table | |
Row | |
Page, table and row level locking allow the same degree of concurrency
|
Table locking can be used for concurrency control with DDL operations.
In row share table is less restrictive but it consists of highest degree of concurrency compared to page and table.
Question 138 |
Consider the following entity relationship diagram (ERD), where two entities E1 and E2 have a relation R of cardinality 1 : m.
The attributes of E1 are A11, A12 and A13 where A11 is the key attribute. The attributes of E2 are A21, A22 and A23 where A21 is the key attribute and A23 is a multi-valued attribute. Relation R does not have any attribute. A relational database containing minimum number of tables with each table satisfying the requirements of the third normal form (3NF) is designed from the above ERD. The number of tables in the database is
2 | |
3 | |
5 | |
4 |
Then, we get
T1: {A11, A12, A13} - key is A11
T2: {A21, A22, A11} - key is A21
T3: {A21, A23} - key is {A21, A23}
Question 139 |
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
0 row and 4 columns | |
3 rows and 4 columns | |
3 rows and 5 columns | |
6 rows and 5 columns |
rows = 3 * 2 = 6
Columns = 3 + 2 = 5
Question 140 |
A relation Empdtl is defined with attributes empcode (unique), name, street, city, state and pincode. For any pincode, there is only one city and state. Also, for any given street, city and state, there is just one pincode. In normalization terms, Empdtl is a relation in
1NF only | |
2NF and hence also in 1NF | |
3NF and hence also in 2NF and 1NF | |
BCNF and hence also in 3NF, 2NF an 1NF |
Here key is empcode and contains only one attribute, hence no partial dependency. But there is transitive dependency in this.
Pincode → city, state, so it is not in 3NF.
Question 141 |
roll no. | marks |
1 | 10 |
2 | 20 |
3 | 30 |
4 | Null |
Update T1 set marks = marks + 5 Select avg(marks) from T1What is the output of the select statement?
18.75 | |
20 | |
25 | |
NULL |
(15+25+35)/3 = 25
Question 142 |
ROLL_NO | NAME | DEPT_ID |
---|---|---|
1 | ABC | 1 |
2 | DEF | 1 |
3 | GHI | 2 |
4 | JKL | 3 |
DEPT_ID | DEPT_NAME |
---|---|
1 | A |
2 | B |
3 | C |
- update Student set Dept_id = Null where Roll_on = 1
- update Department set Dept_id = Null where Dept_id = 1
Both (i) and (ii) will fail | |
(i) will fail but (ii) will succeed | |
(i) will succeed but (ii) will fail | |
Both (i) and (ii) will succeed |
But in (ii) if we set in Department table, Dept_id = Null, then it will produce inconsistency because in Student table we will still have the tuples containing the Dept_id = 1.
Question 143 |
Consider a table T in a relational database with a key field K. A B-tree of order p is used as an access structure on K, where p denotes the maximum number of tree pointers in a B-tree index node. Assume that K is 10 bytes long; disk block size is 512 bytes; each data pointer PD is 8 bytes long and each block pointer PB is 5 bytes long. In order for each B-tree node to fit in a single disk block, the maximum value of p is
20 | |
22 | |
23 | |
32 |
r = record_ptr_size
b = block_ptr_size
(p - 1) (k + r) + p × b ≤ 512
(p - 1) (10 + 8) + p × 5 ≤ 512
23p ≤ 530
p ≤ 23.04
So, maximum value of p possible will be 23.
Question 144 |
A transaction writes a data item after it is read by an uncommitted transaction | |
A transaction reads a data item after it is read by an uncommitted transaction | |
A transaction reads a data item after it is written by a committed transaction
| |
A transaction reads a data item after it is written by an uncommitted transaction
|
Question 145 |
select distinct al, a2,........., an from r1, r2,........, rm where PFor an arbitrary predicate P, this query is equivalent to which of the following relational algebra expressions ?
![]() | |
![]() | |
![]() | |
![]() |
Question 146 |
Data_of_Birth → Age Age → Eligibility Name → Roll_number Roll_number → Name Course_number → Course_name Course_number → Instructor (Roll_number, Course_number) → GradeThe relation (Roll_number, Name, Date_of_birth, Age) is:
in second normal form but not in third normal form | |
in third normal form but not in BCNF | |
in BCNF
| |
in none of the above
|
Date_of_Birth → Age
Name → Roll_number
Roll_number → Name
Candidate keys for the above are:
(Date_of_Birth, Name) and (Date_of_Birth, Roll_number)
Clearly, there is a partial dependency,
Date_of_Birth → Age
So, it is only in 1NF.
Question 147 |
Students: (Roll_number, Name, Date_of_birth) Courses: (Course number, Course_name, Instructor) Grades: (Roll_number, Course_number, Grade)
select distinct Name from Students, Courses, Grades where Students. Roll_number = Grades.Roll_number and Courses.Instructor = Korth and Courses.Course_number = Grades.Course_number and Grades.grade = AWhich of the following sets is computed by the above query?
Names of students who have got an A grade in all courses taught by Korth
| |
Names of students who have got an A grade in all courses
| |
Names of students who have got an A grade in at least one of the courses taught by Korth
| |
in none of the above |
Question 148 |

The schedule is serializable as T2; T3; T1
| |
The schedule is serializable as T2; T1; T3 | |
The schedule is serializable as T3; T2; T1
| |
The schedule is not serializable
|

Cycle formed so not serializable.
Question 149 |
Zero | |
More than zero but less than that of an equivalent 3NF decomposition | |
Proportional to the size of F+ | |
Indetermine |
Question 150 |
Relational algebra is more powerful than relational calculus. | |
Relational algebra has the same power as relational calculus. | |
Relational algebra has the same power as safe relational calculus. | |
None of the above. |
A query can be formulated in safe Relational Calculus if and only if it can be formulated in Relational Algebra.
Question 151 |
A B+- tree index is to be built on the Name attribute of the relation STUDENT. Assume that all student names are of length 8 bytes, disk blocks are of size 512 bytes, and index pointers are of size 4 bytes. Given this scenario, what would be the best choice of the degree (i.e. the number of pointers per node) of the B+-tree?
16 | |
42 | |
43 | |
44 |
Then,
8(P-1) + 4P ≤ 512
12P - 8 ≤ 512
12P ≤ 520
P ≤ 43.33
P = 43
Question 152 |
Relation R is decomposed using a set of functional dependencies, F, and relation S is decomposed using another set of functional dependencies, G. One decomposition is definitely BCNF, the other is definitely 3NF, but it is not known which is which. To make a quaranteed identification, which one of the following tests should be used on the decompositions? (Assume that the closures of F and G are available).
Dependency-preservation | |
Lossless-join | |
BCNF definition | |
3NF definition |
Question 153 |
A functionally determines B and B functionally determines C | |
A functionally determines B and B does not functionally determines C | |
B does not functionally determines C | |
A does not functionally determines B and B does not functionally determines C |
But for the given instance it can be seen that B does not functionally determines C, and it can be concluded for entire relation
Question 154 |
Theory Explanation is given below. |
Question 157 |
Disk capacities are greater than memory capacities | |
Disk access is much slower than memory access | |
Disk data transfer rates are much less than memory data transfer rates | |
Disks are more reliable than memory |
Question 158 |
Department address of every employee | |
Employees whose name is the same as their department name | |
The sum of all employees’ salaries | |
All employees of a given department |
Question 159 |
XY → Z and Z → Y | |
YZ → X and Y → Z | |
YZ → X and X → Z | |
XZ → Y and Y → X |
If for t1[A] = t2[A] then t1[Y] = t2[Y].
Question 160 |
r has no duplicates and s is non-empty | |
r and s have no duplicates | |
s has no duplicates and r is non-empty | |
r and s have the same number of tuples |
Question 161 |
In SQL, relations can contain null values, and comparisons with null values are treated as unknown. Suppose all comparisons with a null value are treated as false. Which of the following pairs is not equivalent?
x = 5 not AND (not (x = 5) | |
x = 5 AND x > 4 and x < 6, where x is an integer | |
x ≠ 5 AND not (x = 5) | |
None of the above |
Question 162 |
Theory Explanation is given below. |
(i)

(ii)

(b)

Question 164 |
m + n and 0 | |
mn and 0 | |
m + n and |m – n| | |
mn and m + n |
Suppose there is no common attribute in R and S due to which natural join will act as cross product. So then in cross product total no. of tuples will be mn.
For minimum:
Suppose there is common attribute in R and S, but none of the row of R matches with rows of S then minimum no. of tuples will be 0.
Question 165 |
σ(A=10∨B=20) (r) | |
σ(A=10) (r) ∪ σ(B=20) (r) | |
σ(A=10) (r) ∩ σ(B=20) (r) | |
σ(A=10) (r) - σ(B=20) (r) |
σ(A=10) (r) ∩ σ(B=20) (r)
Question 166 |
CD | |
EC | |
AE | |
AC |
A) (CD)+ = cdf
Not a key.
B) (EC)+ = ecdabf
Yes, it is a key.
C) (AE)+ = aeb
Not a key. D) (AC)+ = abcf
Not a key.
Question 167 |
B-trees are for storing data on disk and B+ trees are for main memory. | |
Range queries are faster on B* trees. | |
B-trees are for primary indexes and B* trees are for secondary indexes. | |
The height of a B* tree is independent of the number of records. |
Question 168 |
This schedule is serialized and can occur in a scheme using 2PL protocol | |
This schedule is serializable but cannot occur in a scheme using 2PL protocol | |
This schedule is not serialiable but can occur in a scheme using 2PL protocol | |
This schedule is not seralisable and cannot occur in a scheme using 2PL protocol.
|

Since cycle exist so not conflict serializable.
And we know that if the schedule is not serializable then it is not 2PL.
Hence correct option is (D).
Question 169 |
not in 2NF | |
in 2NF but not 3NF | |
in 3NF but not in 2NF | |
in both 2NF and 3NF |
And since every attribute is key so the decomposed relation will be in BCNF and hence in 3NF.
Question 170 |
A = 0, B = 0, C = 1 | |
A = 0, B = 1, C = 1 | |
A = 1, B = 0, C = 1 | |
A = 1, B = 1, C = 1 |

So the above equation is satisfied if either C=0 or A=0 and B=1.
Hence, Option (B) is correct.
Question 171 |
XOR gates, NOT gates | |
2 to 1 multiplexors | |
AND gates, XOR gates | |
Three-input gates that output (A⋅B) + C for the inputs A⋅B and C | |
Both B and C |
(B) 2 to 1 multiplexors is functionally complete.
(C) XOR gate can be used to make a NOT gate. So, (AND, NOT) is functionally complete.
(D) With given gates and inputs NOT gate cannot be derived.
Hence, not complete.
Question 172 |
An SQL query automatically eliminates duplicates | |
An SQL query will not work if there are no indexes on the relations | |
SQL permits attribute names to be repeated in the same relation | |
None of the above |
→ If there are no indexes on the relation SQL, then also it works.
→ SQL does not permit 2 attributes to have same name in a relation.
Question 173 |
R1 ∪ R2 | |
R1 × R2 | |
R1 - R2 | |
R1 ∩ R2 |
Question 174 |
2 NF | |
5 NF | |
4 NF | |
3 NF |
Question 175 |
Age | |
Name | |
Occupation | |
Category |
Question 176 |
Which of the following query transformations (i.e. replacing the l.h.s. expression by the r.h.s. expression) is incorrect? R1 and R2 are relations, C1, C2 are selection conditions and A1, A2 are attributes of R1?
σC1(σC1(R1)) → σC2(σC2(R1)) | |
σC1(σA1(R1)) → σA1(σC1(R1)) | |
σC1(R1 ∪ R2) → σC1(R1) ∪ σC1(R2) | |
πA1(σC1(R1)) → σC1(σA1(R1)) |
Question 177 |
in first normal form but not in second normal form | |
in second normal form but not in third normal form | |
in third normal form | |
None of the above |
Since all a, b, c, d are atomic. So the relation is in 1NF.
Checking the FD's
a → c
b → d
We can see that there is partial dependencies. So it is not 2NF.
So answer is option (A).
Question 178 |
None of (a), (b), (c) or (d) can cause its violation | |
All of (a), (b), (c) and (d) can cause its violation | |
Both (a) and (d) can cause its violation | |
Both (b) and (c) can cause its violation
|

Here 'd' is the foreign key of S and let 'a' is the primary key of R.
(A) Insertion into R: will cause no violation.
(B) Insertion into S: may cause violation because there may not be entry of the tuple in relation R. Example entry of 〈S4, __, __〉 is not allowed.
(C) Delete from R: may cause violation. For example, deletion of tuple 〈S2, __, __〉 will cause violation as there is entry of S2 in the foreign key table.
(D) Delete from S: will cause no violation as it does not result inconsistency.
Question 179 |
True | |
False |
Question 180 |
Yes | |
No |
Question 181 |
Out of syllabus (For explanation see below) |
→ No need of using Union operation here. → In question they gave (∪, −) but we don't use both.
→ And also they are saying that only the minimum number of operators from (∪, −) which is equivalent to R ∩ S.
So, the expression is minimal.
Question 182 |
True | |
False |
Question 183 |
dependency preserving and lossless join | |
lossless join but not dependency preserving | |
dependency preserving but not lossless join | |
not dependency preserving and not lossless join |
R1∩R2 ≠ 0
Given R1(A,B), R2
R1∩R2= 0
Not lossless.
The given relation decomposed into R1(A,B) and R2(C,D) and there are only two functional dependencies A→B and C→D. So the given decomposition is dependency preserving.
Question 184 |
List of all vertices adjacent to a given vertex | |
List all vertices which have self loops | |
List all vertices which belong to cycles of less than three vertices | |
List all vertices reachable from a given vertex |
(b) Finding a self loop is also simple (Oop(X,X))
(c) If a → b, b → c then c!=a, finding this is also simple.
(d) List all the elements reachable from a given vertex is too difficult in Relational Algebra.
Question 185 |
σA=a (r) | |
r | |
σA=a (r)⨝s | |
None of the above |
(b) Display table
(c) A=a for all Tables r and s
Question 186 |
A → B, B → CD | |
A → B, B → C, C → D | |
AB → C, C → AD | |
A → BCD |
Question 187 |
{t|∃u ∈ R1 (t[A] = u[A])∧ ¬∃s ∈ R2 (t[A] = s[A])} | |
{t|∀u ∈ R1 (u[A]= "x" ⇒ ∃s ∈ R2 (t[A] = s[A] ∧ s[A] = u[A]))} | |
{t|¬(t ∈ R1)} | |
{t|∃u ∈ R1 (t[A] = u[A])∧ ∃s ∈ R2 (t[A] = s[A])} |
Question 188 |
A tuple (z,w) with z > y is deleted | |
A tuple (z,w) with z > x is deleted | |
A tuple (z,w) with w < x is deleted | |
The deletion of (x,y) is prohibited |
Question 191 |
(a) - (q), (b) - (r), (c) - (p), (d) - (s) |
Non-procedural query language → Domain calculus
Closure of set of attributes → Function dependency
Natural join → Relational algebraic operations
Question 192 |
Transitive functional dependencies. | |
Non-trivial functional dependencies involving prime attributes on the right-side.
| |
Non-trivial functional dependencies involving prime attributes only on the left-side.
| |
Non-trivial functional dependencies involving only prime attributes. | |
Both (B) and (D). |
B) 3NF because right side is prime attribute.
C) Not in 3NF, because lets suppose ABC is a candidate key. Now consider
AB → Non-prime attribute
which show it is not in 3NF
D) Involves only prime attribute, so right side should definitely contain only prime attribute. So in 3NF.
Question 193 |
Indexed sequential file organization. | |
Two-way linked list. | |
Inverted file organization. | |
Sequential file organization. |
→ An index for each secondary key.
→ An index entry for each distinct value of the secondary key.
→ Exhibits better enquiry performance.