KEMBAR78
Database | PDF | Database Index | Relational Model
0% found this document useful (0 votes)
57 views79 pages

Database

Uploaded by

shivamgopal9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views79 pages

Database

Uploaded by

shivamgopal9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 79

Summary in Graph

Exam Summary (GO Classes CS/DA Test Series 2026 |


Databases | Topic Wise Test)

Qs. Attempted: 6 Correct Marks: 1


3+3 1+0

Correct Attempts: 1 Penalty Marks: 0.33


1+0 0.33 + 0

Incorrect
Attempts:
5 Resultant Marks: 0.67
2+3 0.67 + 0

Total Questions: 15
5 + 10

Total Marks: 25
5 + 20

Exam Duration: 45 Minutes

Time Taken: 16 Minutes

EXAM RESPONSE EXAM STATS FEEDBACK

Technical

Q #1 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

What does physical data independence allow the database administrator to do?

A. Change the conceptual schema without changing the internal schema


B. Change the internal schema without changing the conceptual schema
C. Change the external schema without changing the conceptual schema
D. Change the application programs without changing the internal schema

Your Answer: C Correct Answer: B Incorrect Time taken: 00min 23sec Discuss

Q #2 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

In a relation, R, an attribute “B” of R is “fully functional dependent” on an attribute or set of attributes “A”
of R if B is functional dependent on A but not functional dependent on any proper subset of A. Consider a
relation S in which every non-prime attribute is “fully functional dependent” on every prime attribute. What is
necessarily true for S?

A. S is in 2NF.
B. S is not in 2NF.
C. S is in 2NF but not in 3NF.
D. None of the above.

Your Answer: Correct Answer: D Not Attempted Time taken: 00min 05sec Discuss

Q #3 Multiple Select Type Award: 1 Penalty: 0 Databases

Which of the following is/are NOT a valid rule about functional dependencies (FD's) in context of RDBMS
model?

A. If A → B then B → A
B. If AB → C and A → C, then B → C

C. If AB → C, then A → C or B → C
D. If A → BC, then A → C and A → B

Your Answer: A;B;C Correct Answer: A;B;C Correct Time taken: 01min 02sec Discuss

Q #4 Numerical Type Award: 1 Penalty: 0 Databases

Consider a relation scheme R(A, B, C, D, E) with three candidate keys {AB, BC, CD}. How many super
keys are possible?

Your Answer: 24 Correct Answer: 16 Incorrect Time taken: 02min 16sec Discuss

Q #5 Multiple Select Type Award: 1 Penalty: 0 Databases

Given a relation schema R with a set F of FDs that hold over R, let's define X to be a subset of the
attributes of R, and A is an attribute of R. If, for every FD X → A in F, one of the following is true: A ∈ X
(reads A is an element of X) - i.e. it is a trivial FD or X is a superkey or A is a part of some key for R Then R
is in which form?

A. 1NF
B. 2NF
C. 3NF
D. BCNF

Your Answer: Correct Answer: A;B;C Not Attempted Time taken: 00min 02sec Discuss

Q #6 Numerical Type Award: 2 Penalty: 0 Databases

Consider a relation R(A, B, C, D, E) with functional dependencies:

A, B → C

C, D → E

Suppose there are at most 3 different values for each of A, B, and D. What is the maximum number of
different values for E?

Your Answer: Correct Answer: 27 Not Attempted Time taken: 00min 53sec Discuss
Q #7 Numerical Type Award: 2 Penalty: 0 Databases

Consider a relation schema R with attributes (A, B, C, D, E, F) and the functional dependency set F that
holds on R :

F = {F → AE, A → B, B → ADE, AD → B, BDE → AD}.

How many super keys R has?

Your Answer: 8 Correct Answer: 16 Incorrect Time taken: 03min 19sec Discuss

Q #8 Numerical Type Award: 2 Penalty: 0 Databases

A database relation R has 10 attributes {A, B, C, D, … , J}. “CDEF" is known to be a candidate key of
relation R. There may be other candidate keys, which are unknown. What is the maximum number of
candidate keys that R could simultaneously have?

Your Answer: 1956 Correct Answer: 247 Incorrect Time taken: 03min 36sec Discuss

Q #9 Multiple Select Type Award: 2 Penalty: 0 Databases

Consider a relation schema R with attributes (X, Y, Z, U, V, W) and the functional dependency set F that
holds on R :

F = {Y → U, V → W, U → V, U → Y, W → YU}.

R is decomposed into two relations P(X, Y, U, V), S(Y, Z, U, W).


Which of the following is/are true regarding this decomposition?

A. Decomposition is lossless.
B. Decomposition is dependency preserving.
C. P is in 3NF.
D. S is in 3NF.

Your Answer: Correct Answer: B;C;D Not Attempted Time taken: 00min 04sec Discuss

Q #10 Multiple Select Type Award: 2 Penalty: 0 Databases

Given the relation schema R = (A, B, C, D, E) and the set of functional dependencies (FDs):

F = {E → AB, BC → D, D → E, AB → BC, BC → E}

For which of the following FD “S", closure of F is same as closure of F-S? i.e. which of the following FD
can be removed from F without affecting the Closure of the Set of Functional Dependencies F?

A. AB → B
B. AB → C
C. BC → E
D. BC → D

Your Answer: B;C Correct Answer: A;C Incorrect Time taken: 02min 51sec Discuss
Q #11 Multiple Select Type Award: 2 Penalty: 0 Databases

Consider the relational schema (A, B, C, D) with Functional Dependencies set


F = {A → B, B → ACD, CD → B};

Which of the following Functional Dependencies set is equivalent to F?

A. {A → B, B → CD, CD → A}

B. {A → CD, B → A, CD → B}

C. {A → BCD, B → A, CD → A}

D. {A → CD, B → CD, CD → AB}

Your Answer: Correct Answer: A;B;C;D Not Attempted Time taken: 00min 58sec Discuss

Q #12 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider the relational table R(P, Q, S, T, U, V, W, Y) and the following functional dependencies set F
over R :

P → QST, PT → U, UVW → Y, V → WY

Which of the functional dependencies can be removed from this FD set F without altering the candidate keys
( i.e. after removal of the FD, set of candidate keys in resulting relation must be the same as set of candidate
keys in R)?

A. P → QST

B. PT → U
C. UVW → Y
D. V → WY

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 02sec Discuss

Q #13 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

For a relation R, let α and β be sets of attributes such that α → β holds, but β → α does not hold. Let A be
an attribute that is not in α, is not in β, and for which β → A holds. Then we say that A is "mysteriously
dependent" on α.

A relation schema R is "______" with respect to a set F of functional dependencies if there are no non-prime
attributes A in R for which A is "mysteriously dependent" on some key for R.

What is the correct term to put in the "______"?

A. 3NF
B. Not 3NF
C. BCNF
D. Not 2NF

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 02sec Discuss

Q #14 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider the relation R(A, B, C, D, E) with the following functional dependencies:


A → C; B → C; C → D; DE → C; CE → A

Consider the decomposition "DECOMP" of the relation R into five relations :

DECOMP = {R1, R2, R3, R4, R5}

Where, R1 = {A, D}; R2 = {A, B}; R3 = {B, E}; R4 = {C, D, E}; R5 = {A, E}

Which one of the following options is correct?

A. DECOMP is a lossless decomposition, but not dependency preserving.


B. DECOMP is a lossless decomposition, also dependency preserving.
C. DECOMP is a lossy decomposition, but not dependency preserving.
D. DECOMP is a lossy decomposition, but dependency preserving.

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 01sec Discuss

Q #15 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider the following two statements:

1. Suppose we are given a relation R with attributes A, B, C, D and FDs :

B → C; A → B; A C → D

Then this FD set is irreducible i.e. Minimal.

2. Suppose a relation schema S(A, B, C, D, E, F, G, H, I, J) has FD set :

A B D → E ; A B → G ; B → F ; C → J ; C J → I ; G → H

Then this FD set is irreducible/minimal.

Which of the above statements is/are false?

A. 1 Only
B. 2 Only
C. Both
D. None.

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 03sec Discuss

Copyright & Stuff


Summary in Graph

Exam Summary (GO Classes CS/DA Test Series 2026 |


Databases | Topic Wise Test 2)

Qs. Attempted: 0 Correct Marks: 0


0+0 0+0

Correct Attempts: 0 Penalty Marks: 0


0+0 0+0

Incorrect
Attempts:
0 Resultant Marks: 0
0+0 0+0

Total Questions: 15
5 + 10

Total Marks: 25
5 + 20

Exam Duration: 45 Minutes

Time Taken: 0 Minutes

EXAM RESPONSE EXAM STATS FEEDBACK

Technical

Q #1 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

NULL values in relational model can be used for all except which one of the following scenarios?

A. To allow duplicate tuples in the table by filling the primary key column(s) with NULL.
B. To avoid confusion with actual legitimate data values like 0 for integer columns and ‘ ’ (the empty
string) for string columns.
C. To leave columns in a tuple marked as “unknown” when the actual value is unknown.
D. To fill a column in tuple when that column does not really “exist” for that particular tuple

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss

Q #2 Numerical Type Award: 1 Penalty: 0 Databases

Consider the following ER diagram :


Manager-to-worker mapping is one-to-many.

We convert this ER diagram into the relational model. Minimum how many relations are needed in the
relational model for this ER diagram, if we do not want null values in our database?

Your Answer: Correct Answer: 2 Not Attempted Time taken: 00min 00sec Discuss

Q #3 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Consider the following ER diagram :

“borrower” mapping cardinality is many-to-many. While converting the ER diagram into a relational DBMS
model, the relationship set “borrower” is converted into a relation

borrower(cust_id, loan_id, access_date)

, what is the primary key of “borrower”?

A. cust_id

B. loan_id

C. (cust_id, loan_id)

D. (cust_id, loan_id, access_date)

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Q #4 Numerical Type Award: 1 Penalty: 0 Databases

Consider the following ER diagram showing a Customer entity:


“Email” is a multi-valued attribute, So, A customer may have any number of email ids (possibly zero as well).
We convert this ER diagram into the relational model. Minimum how many relations are needed in the
relational model for this ER diagram?

Your Answer: Correct Answer: 2 Not Attempted Time taken: 00min 00sec Discuss

Q #5 Numerical Type Award: 1 Penalty: 0 Databases

Consider the following ER diagram for Checking Accounts:

We convert this ER diagram into the relational model. Minimum how many relations are needed in the
relational model for this ER diagram?

Your Answer: Correct Answer: 2 Not Attempted Time taken: 00min 00sec Discuss

Q #6 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

In a relation, R attribute B of R is "fully functional dependent" on an attribute or set of attribute A of R if B


is functional dependent on A but not functional dependent on any proper subset of A.
Consider a relation S in which every non-prime attribute is "fully functional dependent" on all candidate keys.
What is necessarily true for S?

A. S is in 2NF.
B. S is in 3NF.
C. S is in BCNF.
D. S is not in BCNF.

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss

Q #7 Multiple Select Type Award: 2 Penalty: 0 Databases

Which of the following is/are correct rules in the context of functional dependencies over a database?

A. If α is a set of attributes and β ⊆ α, then α → β always holds.


B. If α → β holds, and γ is a set of attributes, then γα → γβ holds.
C. If α → β holds, and γβ → δ holds, then αγ → δ holds.
D. If α → β holds, and β → γ holds, then α → γ holds.

Your Answer: Correct Answer: A;B;C;D Not Attempted Time taken: 00min 00sec Discuss
Q #8 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider the following two ER diagrams -- ER1 and ER2.

The statement that the number of entities in an entity set P must be greater than or equal to the number of
entities in an entity set Q holds for

A. ER1 but not ER2


B. ER2 but not ER1
C. Both ER1 and ER2
D. Neither ER1 nor ER2

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 01sec Discuss

Q #9 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider the following schema.

create table T (
c integer primary key,
d integer);

create table S (
b integer primary key,
c integer references t(c) on delete cascade);

create table R (
a integer primary key,
b integer references s(b) on delete set null);

Suppose the current contents of R, S, and T are as follows.

After executing the command:


delete from T;

What tuples will R contain? (By the above command, all records in the table T will be deleted!)

A. R will not be changed.


B. (1, NULL) and (2, 2).
C. (1, NULL) and (2, NULL).
D. (2, 2) only.

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Q #10 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider the following ER diagram :

Primary keys of the entity set P, Q, S, T are M, N, O, K respectively. While converting the ER diagram into
relational DBMS model, the relationship set R is converted into a relation R(M, N, O, K), what is the primary
key of R?

A. M
B. KNO
C. MKO
D. N

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Q #11 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider the following five ER diagrams - ER1 to ER5.


For which of these ER diagrams the following is true :
“The number of entities in an entity set B must be greater than or equal to the number of entities in an entity
set A”

A. ER1, ER2 only


B. ER5 only
C. ER3, ER5 only
D. ER4, ER5 Only

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #12 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Under a relational database system, in the most general case, if table R has a foreign key (FK) constraint
referencing table S, then, via the FK,

A. each tuple in R is related to zero or more tuples in S.


B. each tuple in R is related to zero or one tuple in S.
C. each tuple in R is related to exactly one tuple in S.
D. each tuple in R is related to one or more tuples in S.

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #13 Multiple Select Type Award: 2 Penalty: 0 Databases


Consider the following ER diagram:

There is One-to-one mapping between customers, loans.

Assume that the Participation of loan in borrower is total.

We convert this ER diagram into the relational model. What will be the correct relational model design for this
ER diagram, if we do not want null values in our database?

A.
customer(*cust_id, name, street_address, city) ;
loan (*loan_id, amount ) ;
borrower(*cust_id, loan_id ) ;

B.
customer(*cust_id, name, street_address, city) ;
loan (*loan_id, cust_id, amount ) ;

C.
customer(*cust_id, name, street_address, city) ;
loan (*loan_id, amount ) ;
borrower(cust_id, *loan_id ) ;

D.
customer(*cust_id, loan_id, name, street_address, city) ;
loan (*loan_id, amount ) ;

Your Answer: Correct Answer: A;B;C Not Attempted Time taken: 00min 00sec Discuss

Q #14 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider a relation R with 2d attributes (d is an integer ≥ 2) that are named A1 , A2 , A3 , … , A2d . There is a
set F of 2d FDs on R : Ai → A1+(i+1) mod 2d , for i = 1 … 2d. (Here, mod is the modulo operator).

For example, suppose d = 2, the attributes are A1 , A2 , A3 , A4 and


F = {A1 → A3 , A3 → A1 , A2 → A4 , A4 → A2 }

How many keys are present in R?

A. d
B. d + 2
C. 2d
D. d 2

Your Answer: Correct Answer: D Not Attempted Time taken: 00min 00sec Discuss

Q #15 Numerical Type Award: 2 Penalty: 0 Databases

The ER diagram shown below depicts a car rental scheme, where every customer can take more than 1 car
for rent, or 1 car may be rented to multiple customers.
If the above ER diagram is mapped to a relational model, to correctly depict the above scenario, the total
number of required relations is _________

Your Answer: Correct Answer: 5 Not Attempted Time taken: 00min 00sec Discuss

Copyright & Stuff


Summary in Graph

Exam Summary (GO Classes CS/DA Test Series 2026 |


Databases | Topic Wise Test 3)

Qs. Attempted: 0 Correct Marks: 0


0+0 0+0

Correct Attempts: 0 Penalty Marks: 0


0+0 0+0

Incorrect
Attempts:
0 Resultant Marks: 0
0+0 0+0

Total Questions: 15
5 + 10

Total Marks: 25
5 + 20

Exam Duration: 45 Minutes

Time Taken: 0 Minutes

EXAM RESPONSE EXAM STATS FEEDBACK

Technical

Q #1 Multiple Select Type Award: 1 Penalty: 0 Databases

Suppose that two relations A(X, Y) and B(X, Y) have exactly the same schema. Also, there are no null
values in the relations.
Which of the following equalities hold in relational algebra? (Where " × " is Cartesian-Product Operation)

A. A ∩ B = A - (A - B)
B. A ∩ B = B - (B - A)
C. A ∩ B = A NATURAL-JOIN B
D. A ∩ B = A × B

Your Answer: Correct Answer: A;B;C Not Attempted Time taken: 00min 00sec Discuss

Q #2 Numerical Type Award: 1 Penalty: 0 Databases

Consider the following relation schemas: r(A, B), t(B, C) and their instances :

r(A, B) = {⟨a , b⟩ , ⟨ a , c ⟩ , ⟨ c , d ⟩ , ⟨ b, e⟩ }
t(B, C) = {⟨b, e⟩, ⟨d, h⟩, ⟨b, f ⟩, ⟨a, d⟩, ⟨a, e⟩}

How many rows are present in the result of the following relational algebra expression using left-outer-
natural-join :
π A, C (r ⋈ LEFT t)

Your Answer: Correct Answer: 5 Not Attempted Time taken: 00min 00sec Discuss

Q #3 Multiple Select Type Award: 1 Penalty: 0 Databases

Consider the following relations and query.

r(A, B, C)

s(A, B, C)

σ A>C ([(r ∪ s) - (r - s)] - (s - r))

Which of the following is equivalent to the above query?

A. σ A>C (r ⋈ s)

B. σ A>C (r ∪ s)

C. σ A>C (r) ∩ σ A>C (s)

D. σ A>C (r ∩ s)

Your Answer: Correct Answer: A;C;D Not Attempted Time taken: 00min 00sec Discuss

Q #4 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Consider the relations r, s and query :

t1 ← σθ ((r × s) ÷ r)
t2 ← σθ ( s)
t 3 ← σ θ ( r)

Relation r is not empty.

Which of the following is correct?

A. t1 = t3
B. t2 = t3
C. t1 = t2
D. None of the above

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Q #5 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Consider the following schema:

Sailors( sid: integer , sname: string, rating: integer, age: real)


––––––––––––
Boats( bid: integer , bname: string, color: string)
––––––––––––
Reserves( sid: integer, bid: integer, day: date )
–––––––––––––––––––––––––––––––––––––

The primary key fields are underlined, and the domain of each field is listed after the field name. Assume
there are no NULL values in any column of any relation.

Consider the following query :


SELECT S.sname
FROM Sailors S, Reserves R, Boats B
WHERE S.sid = R.sid AND R.bid = B.bid
AND (B.color = ‘blue’ AND B.color = ‘white’)

What is the output of the above query?

A. The names of sailors who have reserved a blue or a white boat.


B. The names of sailors who have reserved a blue AND a white boat.
C. The names of sailors who have reserved neither a blue nor a white boat.
D. Empty set.

Your Answer: Correct Answer: D Not Attempted Time taken: 00min 00sec Discuss

Q #6 Numerical Type Award: 2 Penalty: 0 Databases

Consider the following Student database and the relations in it :

Student (sid, name, marks)

Course (cid, min, max)

Student relation has the following set of tuples :

{(101, a, 50), (102, b, 52), (103, c, 60), (104, d, 70)}

Course relation has the following set of tuples :

{(c1, 20, 90), (c2, 15, 95), (c3, 10, 100)}

Consider the following query :

SELECT S.sid
FROM Student S
WHERE EXISTS ( SELECT COUNT(*)
FROM Course C
5. WHERE S.marks > C.min AND S.marks > C.max)

How many tuples will be in the output of the above SQL Query?

Your Answer: Correct Answer: 4 Not Attempted Time taken: 00min 00sec Discuss

Q #7 Multiple Select Type Award: 2 Penalty: 0 Databases

Let R = (A, B, C), S = (C, D, E) and let q and r be a relation on schema R and s be a relation on schema
S.

Consider the following queries :

1. {< a >∣ ∃b(< a, b >∈ r ∧ b = 10)}


2. SELECT DISTINCT A FROM r WHERE B=10

3. SELECT DISTINCT * FROM r EXCEPT SELECT DISTINCT * FROM s

4. SELECT DISTINCT * FROM q WHERE (A, B, C) NOT IN (SELECT DISTINCT * FROM r)

Which of the following is/are true? (Two queries are said to be equivalent when they produce the same
output, i.e., the same set of records)
A. Query 1 and 2 are equivalent.
B. Query 1 and 3 are equivalent
C. Query 2 and 4 are equivalent
D. Query 3 and 4 are equivalent

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss

Q #8 Numerical Type Award: 2 Penalty: 0 Databases

Consider the following database relations :

Enrolled(Student, Course) : It contains the courses that each student has enrolled into, and
ToDo(Course) : It contains the courses that are required to graduate.

The instance for Enrolled relation is shown below:

Student Course
Robert Databases

Robert Programming Languages

Susie Databases

Susie Operating Systems

Julie Programming Languages

Julie Machine Learning

Emilie Operating Systems

The instance for ToDo relation is shown below:

Course
Databases

Programming Languages

We run the following SQL Query of this database :

SELECT DISTINCT Student


FROM Enrolled
WHERE Course IN (SELECT Course FROM ToDo);

How many tuples will be there in the output of this SQL Query?

Your Answer: Correct Answer: 3 Not Attempted Time taken: 00min 00sec Discuss

Q #9 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider the following schema:

Sailors( sid: integer , sname: string, rating: integer, age: real)


––––––––––––

Boats( bid: integer , bname: string, color: string)


––––––––––––
Reserves( sid: integer, bid: integer, day: date )
–––––––––––––––––––––––––––––––––––––

The primary key fields are underlined, and the domain of each field is listed after the field name. Assume
there are no NULL values in any column of any relation and every relation has at least one tuple. “Sid" of
Reserves is foreign key to Sailor.sid.
Assume that there exists a sailor who has reserved a boat with bid 104 in the reserves table.

Consider the following query :


SELECT S.sid
FROM Sailors S, Reserves R
WHERE S.rating =10 OR R.bid =104

What is the output of the above query?

A. All sids of sailors who have a rating of 10 AND have reserved boat 104.
B. All sids of sailors who have a rating of 10 OR have reserved boat 104.
C. All sids of sailor table
D. Empty set.

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Q #10 Multiple Select Type Award: 2 Penalty: 0 Databases

Assume we have two relations R(A, B) and S(B, C). All three attributes (A, B, C) are integer attributes.
Assume that Relation R contains the following tuples: (1, 2), (2, 3), and (3, 4). Assume that relation S
contains the following tuples (2, 2), (2, 3), and (5, 1). Note that " × " is Natural join, in the following
expressions.

Which of the following relational algebra expressions are equivalent, with respect to the above information?

A. π σ (R)) and σ
A ( B=1 B=1 (π A (R))

B. π (σA (R)) and σ


A=1 A=1 (π A (R))

C. π (R × S) and (π
A, B A, B (R)) × S

D. σ (R × S) and (σ
B=1 B=1 (R)) × S

Your Answer: Correct Answer: B;D Not Attempted Time taken: 00min 00sec Discuss

Q #11 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Given relations r and s. Let Function C denote the number of results in the output. Which of the following
statements "can be" correct? (Hint: Discard the statements which are NEVER possible)

A. I and II
B. II and III
C. Only III
D. III and IV

Your Answer: Correct Answer: D Not Attempted Time taken: 00min 00sec Discuss

Q #12 Numerical Type Award: 2 Penalty: 0 Databases

For a simple undirected finite graph G, graph degrees (degrees of vertices of graph ) are stored in a database
table Deg(G). This table has two attributes V, D where V represents the vertices and D represents
corresponding degree of those vertices i.e. If vi is some vertex of degree di in graph G then there will be a
v d
row i , i in Deg(G). V is the primary key in this table. For a 100 vertices simple graph G, the summation of
π
minimum and maximum possible value of | D (Deg(G))| will be _________

Your Answer: Correct Answer: 100 Not Attempted Time taken: 00min 02sec Discuss

Q #13 Multiple Select Type Award: 2 Penalty: 0 Databases

Consider the following three relational schemas in a database :

CREATE TABLE R(A INT PRIMARY KEY, B INT);

CREATE TABLE S(C INT PRIMARY KEY, A INT REFERENCES R(A) ON DELETE CASCADE);

CREATE TABLE T(D INT PRIMARY KEY, C INT REFERENCES S(C) ON DELETE SET NULL);

Consider the following instances of relations R, S, T :

A B
a a
b b
S

C A
b a
c a
T

D C
a b
c c

Which of the following is correct?

A. After executing the command “DELETE FROM T;”, R will remain unchanged.
B. After executing the command “DELETE FROM S;”, R will remain unchanged.
C. After executing the command “DELETE FROM S;”, T will contain 2 tuples.
D. After executing the command “DELETE FROM R;”, T will contain 2 tuples.

Your Answer: Correct Answer: A;B;C;D Not Attempted Time taken: 00min 00sec Discuss

Q #14 Multiple Select Type Award: 2 Penalty: 0 Databases

abcd
Let R( , , , ) be a RDBMS relation having the following set of functional dependencies(FD set) :
FD Set F = {b → c; c → d; ab → d; bc → cd} We apply some queries on a relational instance r of R. Which
of the following queries are guaranteed to return the same number of tuples as in relation instance r?

A. ∏a (r)
B. ∏a c (r)
C. ∏a b (r)
,

D. ∏a b d (r)
,

, ,

Your Answer: Correct Answer: C;D Not Attempted Time taken: 00min 00sec Discuss
Q #15 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

For a RDBMS relation T(P, Q, R, S, U), the following set F of functional dependencies holds:

F = {P → QR; RS → U; Q → S; U → P}

Ram decomposes T into two relations X(P, Q, R), Y(R, S, U).


Shyam decomposes T into two relations A(P, Q, R), B(P, S, U).

Which of the following is/are necessarily true on any(every) instance t of relation T?

A. X ⋈ Y = t
B. X ⋈ Y ≠ t
C. A ⋈ B = t
D. A ⋈ B ≠ t

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Copyright & Stuff


Summary in Graph

Exam Summary (GO Classes CS/DA Test Series 2026 |


Databases | Topic Wise Test 4)

Qs. Attempted: 0 Correct Marks: 0


0+0 0+0

Correct Attempts: 0 Penalty Marks: 0


0+0 0+0

Incorrect
Attempts:
0 Resultant Marks: 0
0+0 0+0

Total Questions: 15
5 + 10

Total Marks: 25
5 + 20

Exam Duration: 45 Minutes

Time Taken: 0 Minutes

EXAM RESPONSE EXAM STATS FEEDBACK

Technical

Q #1 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

An index whose search key is different from the sequential order of the file (i.e., records in the file are not
physically ordered according to search key of index) is called?

A. Primary index
B. Secondary index
C. Clustering index
D. Sparse index

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #2 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

If order of data records in a file is the same as, or 'close to’, order of data entries in an index, then the index is
called?

A. Sparse
B. secondary
C. Clustered
D. Dense
Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Q #3 Numerical Type Award: 1 Penalty: 0 Databases

B
+
Tree is constructed by parameter n

Each Node (except root) has ⌈n/2⌉ to n pointers


Each Node (except root) has ⌈n/2⌉ − 1 to n − 1 search-key values

What is the total number of key values in the internal nodes of B +


tree with 1000 Leaf Nodes?

Your Answer: Correct Answer: 999 Not Attempted Time taken: 00min 00sec Discuss

Q #4 Numerical Type Award: 1 Penalty: 0 Databases

In B trees, Data is present only at leaves. So, to get record pointer of any key, we always have to traverse
+

from root node to leaves. Records in leaves require more Disk I/O’s to access.

Consider the following B tree index for a relation R on key field “k”.
+

We run the following SQL query :

SELECT * FROM R WHERE k > 32 AND k < 179;

What is the minimum number of disk I/O's required to retrieve the Index blocks containing the record
pointers (not including the disk I/O's to read the actual records) of the records desired by the given query?

Your Answer: Correct Answer: 6 Not Attempted Time taken: 00min 00sec Discuss

Q #5 Numerical Type Award: 1 Penalty: 0 Databases

The order of a leaf node in a B tree is the maximum number of (value, data record pointer) pairs it can hold.
Given that the block size is 1K bytes, data record pointer is 7 bytes long, the value field is 9 bytes long and
a block pointer is 6 bytes long, what is the order of the leaf node?

Your Answer: Correct Answer: 46 Not Attempted Time taken: 00min 00sec Discuss
Q #6 Numerical Type Award: 2 Penalty: 0 Databases

Recall that in a B-tree of order p Each node has at most p tree pointers. Each node, except the root and leaf
,

nodes, has at least ⌈( p /2)⌉ tree pointers. The root node has at least two tree pointers unless it is the only
q q p q
node in the tree. A node with tree pointers, ≤ , has − 1 (search key field value, data pointer) pairs. All
leaf nodes are at the same level. Leaf nodes have the same structure as internal nodes except that all of their
tree pointers are NULL. We build a B-tree of order 5 by inserting the following letters in the given order, one
after one.

A, G, F, B, K, D, H, M, J, E, S, I, R, X, C, L, N, T, U, P

The number of Node splits that happen while insertion of these letters into the B tree is _______

Your Answer: Correct Answer: 6 Not Attempted Time taken: 00min 00sec Discuss

Q #7 Numerical Type Award: 2 Penalty: 0 Databases

A B-Tree of order m is an m-way search tree in which every node ,except root node, has at least m /2

children. The height of a one level tree is defined to be 0, the height of a tree with two levels is defined to be
1, and so on. What is the minimum number of distinct keys (or records) stored in a B Tree of height 5 and

order 5?

Your Answer: Correct Answer: 485 Not Attempted Time taken: 00min 00sec Discuss

Q #8 Numerical Type Award: 2 Penalty: 0 Databases

A B-Tree of order m is an m-way search tree in which every node ,except root node, has at least m /2

children. The height of a one-level tree is defined to be 0, the height of a tree with two levels is defined to be
1, and so on. What is the maximum number of distinct keys (or records) stored in a B Tree of height 5 and

order 5?

Your Answer: Correct Answer: 15624 Not Attempted Time taken: 00min 00sec Discuss

Q #9 Numerical Type Award: 2 Penalty: 0 Databases

B
+
Tree is constructed by parameter n
Each Node (except root) has ⌈ n /2⌉ to n pointers
Each Node (except root) has ⌈ n /2⌉ − 1 to n − 1 search-key values

The height of a one-level tree is defined to be 0, the height of a tree with two levels is defined to be 1, and so
on.

What is the maximum number of distinct keys (or records) stored in a B Tree of height 4 and order 5?
+

Your Answer: Correct Answer: 2500 Not Attempted Time taken: 00min 00sec Discuss

Q #10 Numerical Type Award: 2 Penalty: 0 Databases

In a B-tree, we store both keys and record pointers in the internal and leaf nodes, but in a B tree, we store +

the record pointers in the leaf nodes only. The main advantage of B trees over B trees is that B trees
+ +

allow us to pack in more tree pointers to the internal nodes by removing pointers to data, thus increasing the
fanout and potentially decreasing the depth of the tree. Leaf node of B tree has one block pointer which
+
points to the sibling to the right of the tree. Given that the block size is 1 K bytes, data record pointer is
7 bytes long, the value field is 9 bytes long and a block pointer is 6 bytes long. If we use B tree index, then
the maximum number of record pointers that can be stored in the index of height 1 is X, whereas If we use
tree index, then the maximum number of record pointers that can be stored in the index of height 1 (i.e.
+
B

two levels) is Y, then Y − X is _______

Your Answer: Correct Answer: 2076 Not Attempted Time taken: 00min 00sec Discuss

Q #11 Numerical Type Award: 2 Penalty: 0 Databases

In B +
-tree, each node stores up to d references to children and up to d − 1 keys.
Consider the following B +
- tree for which d = 4.

If we insert value “12” in this B then how many Node Splits will occur?
+
tree,

Your Answer: Correct Answer: 2 Not Attempted Time taken: 00min 03sec Discuss

Q #12 Multiple Select Type Award: 2 Penalty: 0 Databases

In B trees, Data is present only at leaves. So, to get record pointer of any key, we always have to traverse
+

from root node to leaves. Records in leaves require more Disk I/O’s to access.
Consider the following B tree.
+

We want to find out the minimum number of disk IOs required to retrieve the record pointers (not including
the disk IOs to read the actual records). Since in B tree, the leaf nodes are linked to provide ordered access
+

to the records, We assume we need to follow the sequence pointers of the leaf nodes to traverse the leaf
nodes (if necessary).
Which of the following is/are correct?
A. To Find records with the key values in the range 101 to 110 inclusive : 3 disk IO
B. To Find records with the key values in the range 150 to 179 inclusive : 4 Disk IO
C. Find records with the key values in the range 30 to 110 inclusive : 4 Disk IO
D. Find records with the key values in the range 3 to 179 inclusive : 7 Disk IO

Your Answer: Correct Answer: A;C;D Not Attempted Time taken: 00min 00sec Discuss

Q #13 Numerical Type Award: 2 Penalty: 0 Databases

Order “d” of B +
tree is define as follows : Each interior node except root node has m keys, m + 1 child
pointers where d ≤ m ≤ 2d. The root has m keys, m + 1 child pointers for 1 ≤ m ≤ 2d. Each leaf node has
m keys, m record pointers and one block pointer pointing to the sibling to the right in the B tree, where +

d ≤ m ≤ 2d. The height of a one-level tree is defined to be 0, the height of a tree with two levels is defined
to be 1, and so on. What is the minimum number of distinct keys (or records) stored in a B +
Tree of height 8
and order 2?

Your Answer: Correct Answer: 8748 Not Attempted Time taken: 00min 00sec Discuss

Q #14 Numerical Type Award: 2 Penalty: 0 Databases

Consider a Ordered file with number of records r = 300000 .

Let ordering key field is 9 bytes, block pointer is 6 bytes;

Disk block size = B = 4096 bytes.


File records are fixed size and unspanned.
Record length = R = 100 bytes

The I/O cost, in terms of maximum number of blocks needed to fetch into main memory in worst case, when
there is NO index over the file is X and the I/O cost when there is single level primary index built for the file
is Y. Then X − Y is _______

Your Answer: Correct Answer: 7 Not Attempted Time taken: 00min 00sec Discuss

Q #15 Numerical Type Award: 2 Penalty: 0 Databases

Consider an empty B Tree with order 5 for every node, i.e. there are at most 5 pointers per node (i.e. at
+

most 4 keys per node). The records with key values as even numbers from 100 to
202 (i.e. 100, 102, 104, … , 202) are inserted into the B tree in some order such that each leaf is full. The
+

maximum and minimum number of nodes that are possible in such B +


tree are X, Y respectively. Then
X − Y is _______

Your Answer: Correct Answer: 1 Not Attempted Time taken: 00min 00sec Discuss

Copyright & Stuff


Summary in Graph

Exam Summary (GO Classes DA Test Series 2026 |


Databases Management and Warehousing | Topic Wise
Test 5)

Qs. Attempted: 10 Correct Marks: 8


10 + 0 8+0

Correct Attempts: 8 Penalty Marks: 0.67


8+0 0.67 + 0

Incorrect
Attempts:
2 Resultant Marks: 7.33
2+0 7.33 + 0

Total Questions: 10
10 + 0

Total Marks: 10
10 + 0

Exam Duration: 30 Minutes

Time Taken: 2 Minutes

EXAM RESPONSE EXAM STATS FEEDBACK

Technical

Q #1 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Suppose the minimum and maximum values for the attribute income are $12, 000 and $98, 000, respectively.
We would like to map income to the range (0.0, 1.0].
What is the result of the min-max normalization for an income of $73, 600 ?

A. 0.716

B. 0.63

C. 0.85

D. 0.75

Your Answer: A Correct Answer: A Correct Time taken: 00min 10sec Discuss

Q #2 Multiple Choice Type Award: 1 Penalty: 0.33 Databases


Let the minimum, maximum, mean and standard deviation values for the attribute income of data scientists
be ₹46000, ₹ 170000, ₹ 96000, and ₹ 21000, respectively. The z-score normalized income value of ₹ 106000
is closest to which ONE of the following options? 0.217 0.476 0.623 2.304

Your Answer: C Correct Answer: B Incorrect Time taken: 00min 29sec Discuss

Q #3 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

A community is considering building a new skateboard park, and wants to survey people's opinions. Younger
people might have a different opinion about the skateboard park than older people, so, to ensure that each
age group is properly represented, separate simple random samples are taken from the different age groups,
and the results are combined. What is this sampling method called?

A. Cluster sampling
B. Stratified sampling
C. Simple random sampling
D. None of the Above

Your Answer: B Correct Answer: B Correct Time taken: 00min 07sec Discuss

Q #4 Multiple Select Type Award: 1 Penalty: 0 Databases

Which of the following is/are holistic measures in data warehousing?

A. Median
B. Count
C. Mode
D. Rank

Your Answer: A;C;D Correct Answer: A;C;D Correct Time taken: 00min 15sec Discuss

Q #5 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Which data warehouse schema consists of multiple interconnected fact and dimension tables?

A. Star Schema
B. Snowflake Schema
C. Constellation Schema
D. None of the above

Your Answer: C Correct Answer: C Correct Time taken: 00min 07sec Discuss

Q #6 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Consider discretizing a continuous attribute whose values are listed below:

3, 4, 5, 10, 21, 32, 43, 44, 46, 52, 59, 67

Using equal-width partitioning and four bins, how many values are there in the first bin (the bin with small
values)?
A. 1

B. 2

C. 3

D. 4

Your Answer: D Correct Answer: D Correct Time taken: 00min 05sec Discuss

Q #7 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Consider the following sorted data:

{3, 6, 12, 19, 24, 27, 33, 35, 42, 48}

What will be the result of applying Equal-Width Binning by dividing the range into 3 bins?

A. {3, 6, 12}, {19, 24, 27}, {33, 35, 42, 48}


B. {3, 6, 12, 19}, {24, 27, 33}, {35, 42, 48}
C. {3, 6, 12}, {19, 24, 27}, {33, 35, 42}
D. {3, 6, 12, 19, 24}, {27, 33, 35}, {42, 48}

Your Answer: A Correct Answer: A Correct Time taken: 00min 39sec Discuss

Q #8 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

What is the probability of selecting a sample { u u


1, 2, …, un } from the population { u u
1, 2, …, uN } using
simple random sampling without replacement?

A. Nn
1

B.
n
N

C. N1
( ) n

D.
n !

N !

Your Answer: C Correct Answer: C Correct Time taken: 00min 03sec Discuss

Q #9 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Trying to better understand wildlife health, a government agency randomly selects 100 parks and contracts
rangers at these parks to catch and examine 20 random animals in each. This is likely an example of which
kind of sample design?

A. Simple Random Sample


B. Stratified Random Sample
C. Cluster Sample
D. None of the above
Your Answer: B Correct Answer: C Incorrect Time taken: 00min 16sec Discuss

Q #10 Numerical Type Award: 1 Penalty: 0 Databases

What is the frequency of the median weight?

A. 7
B. 8
C. 12
D. 14

Your Answer: 12 Correct Answer: C;12 Correct Time taken: 00min 03sec Discuss

You're doing Great!

Copyright & Stuff


Summary in Graph

Exam Summary (GO Classes GATE CS/DA | DBMS |


Relational Model | Weekly Quiz 1)

Qs. Attempted: 9 Correct Marks: 6


9+0 6+0

Correct Attempts: 6 Penalty Marks: 1


6+0 1+0

Incorrect
Attempts:
3 Resultant Marks: 5
3+0 5+0

Total Questions: 10
10 + 0

Total Marks: 10
10 + 0

Exam Duration: 30 Minutes

Time Taken: 5 Minutes

EXAM RESPONSE EXAM STATS FEEDBACK

Technical

Q #1 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

The primary key is selected from the:

A. Composite keys
B. Determinants
C. Candidate keys
D. Foreign keys

Your Answer: C Correct Answer: C Correct Time taken: 00min 09sec Discuss

Q #2 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Let R=(A,B,C,D,E) having following FDs. F = {A → BC, CD → E, B → D, E → A}.

Which of the following is not a Candidate key?

A. A
B. B
C. E
D. BC
Your Answer: B Correct Answer: B Correct Time taken: 00min 46sec Discuss

Q #3 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

A minimal super key (i.e, one of the super keys for which no proper subset is a superkey) is called:

A. Super Key
B. Candidate Key
C. Primary Key
D. Both Candidate and Primary Key

Your Answer: D Correct Answer: B Incorrect Time taken: 00min 15sec Discuss

Q #4 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

A functional dependency of the form x → y is trivial if


A. y⊆x
B. y⊂x
C. x ⊆ y
D. x ⊂ y and y ⊂ x

Your Answer: B Correct Answer: A Incorrect Time taken: 00min 37sec Discuss

Q #5 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

If every functional dependency in set E is also in closure of F then this is classified as


A. FD is covered by E
B. E is covered by F
C. F is covered by E
D. F plus is covered by E

Your Answer: C Correct Answer: B Incorrect Time taken: 00min 10sec Discuss

Q #6 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Rule which states that addition of same attributes to right side and left side will result in other valid
dependency is classified as

A. referential rule
B. inferential rule
C. augmentation rule
D. reflexive rule

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 36sec Discuss

Q #7 Multiple Choice Type Award: 1 Penalty: 0.33 Databases


IfR is a relation in Relational Data Model and A , A , … An are the attributes of relation R, what is the
1 2

cardinality of R expressed in terms of domain of attributes?

A. ∣R ∣≤∣ dom (A ) × dom (A ) … dom (An )∣


1 2

B. ∣R ∣≥∣ dom (A ) × dom


1 (A ) … dom 2 (An )∣
C. ∣R ∣= max (∣ dom(A ) ∣, ∣ dom (A ) ∣, ⋯ ∣ dom (An ) ∣)
1 2

D. ∣R ∣= min (∣ dom(A ) ∣, ∣ dom (A ) ∣, ⋯ ∣ dom (An ) ∣)


1 2

Your Answer: A Correct Answer: A Correct Time taken: 00min 14sec Discuss

Q #8 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

The employee salary should not be greater than Rs.2000. This is

A. integrity constraint
B. referential constraint
C. over-defined constraint
D. feasible constraint

Your Answer: A Correct Answer: A Correct Time taken: 00min 07sec Discuss

Q #9 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

A primary key, if combined with a foreign key creates

A. parent child relationship between the tables that connect them


B. many-to-many relationship between the tables that connect them
C. network model between the tables that connect them
D. none of these

Your Answer: A Correct Answer: A Correct Time taken: 00min 32sec Discuss

Q #10 Numerical Type Award: 1 Penalty: 0 Databases

The maximum number of superkeys for the relation schema R(E, F , G, H ) with E as the key is ---

Your Answer: 8 Correct Answer: 8 Correct Time taken: 01min 14sec Discuss

You're doing good, you can target above 70


percentage!

Copyright & Stuff


Summary in Graph

Exam Summary (GO Classes GATE CS/DA | DBMS |


Functional Dependency | Weekly Quiz 2)

Qs. Attempted: 9 Correct Marks: 11


5+4 5+6

Correct Attempts: 8 Penalty Marks: 0


5+3 0+0

Incorrect
Attempts:
1 Resultant Marks: 11
0+1 5+6

Total Questions: 10
5+5

Total Marks: 15
5 + 10

Exam Duration: 30 Minutes

Time Taken: 12 Minutes

EXAM RESPONSE EXAM STATS FEEDBACK

Technical

Q #1 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Let x, y, z, a, b, c be the attributes of an entity set E. If {x}, {x, y}, {a, b}, {a, b, c}, {x, y, z} are superkeys
then which of the following are the candidate keys?
A. {x, y} and {a, b}
B. {x} and {a, b}
C. {x, y, z} and {a, b, c}
D. {z} and {c}

Your Answer: B Correct Answer: B Correct Time taken: 00min 06sec Discuss

Q #2 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Armstrong’s inference rule doesnot determine


A. Reflexivity

B. Augmentation

C. Transitivity

D. Mutual dependency
Your Answer: D Correct Answer: D Correct Time taken: 01min 19sec Discuss

Q #3 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

In functional dependency Armstrong inference rules refers to


A. Reflexive, Augmentation and Decomposition

B. Transitive, Augmentation and Reflexive

C. Augmentation, Transitive, Reflexive and Decomposition

D. Reflexive, Transitive and Decomposition

Your Answer: B Correct Answer: B Correct Time taken: 00min 39sec Discuss

Q #4 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Considering the following table in a relational database :

Last Name Rank Room shift

Smith Manager 234 Morning

Jones Custodian 33 Afternoon

Smith Custodian 33 Evening

Doe Clerical 222 Morning

According to the data shown in the table, which of the following could be a candidate key of the table?
A .{Last Name}

B. {{Room}}

C. {{Shift}}

D. {{Room, Shift}}

Your Answer: D Correct Answer: D Correct Time taken: 00min 07sec Discuss

Q #5 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Purpose of 'Foreign Key' in a table is to ensure


A. Null Integrity

B. Referential Integrity

C .Domain Integrity

D. Null and Domain Integrity

Your Answer: B Correct Answer: B Correct Time taken: 00min 03sec Discuss

Q #6 Multiple Choice Type Award: 2 Penalty: 0.67 Databases


If D1 , D2 , … Dn are domains in a relational model, then the relation is a table, which is a subset of
A. D1 ⊕ D2 ⊕ ⋯ ⊕ Dn

B. D1 × D2 × ⋯ × Dn

C. D1 ∪ D2 ∪ ⋯ ∪ Dn

D. D1 ∩ D2 ∩ ⋯ ∩ Dn

Your Answer: B Correct Answer: B Correct Time taken: 00min 07sec Discuss

Q #7 Multiple Select Type Award: 2 Penalty: 0 Databases

Given the relational schema R = (U , V , W , X, Y , Z ) and the set of functional dependencies:

{ U → V , U → W , WX → Y , WX → Z , V → X}

Which of the following functional dependencies can be derived from the above set?
A. V W → YZ

B. WX → YZ

C. V W → U

D. V W → Y

Your Answer: A;B;D Correct Answer: A;B;D Correct Time taken: 01min 53sec Discuss

Q #8 Numerical Type Award: 2 Penalty: 0 Databases

A functional dependency F : X → Y is termed as a useful functional dependency if and only if it satisfies all
the following three conditions:
X is not the empty set.
Y is not the empty set.
Intersection of X and Y is the empty set.

For a relation R with 4 attributes, the total number of possible useful functional dependencies is ------.

Your Answer: Correct Answer: 50 Not Attempted Time taken: 03min 11sec Discuss

Q #9 Multiple Select Type Award: 2 Penalty: 0 Databases

The symbol → indicates functional dependency in the context of a relational database. Which of the
following options is/are TRUE?
A. (X, Y ) → (Z , W ) implies X → (Z , W )

B. (X, Y ) → (Z , W ) implies (X, Y ) → Z

C. ((X, Y ) → Z and W → Y ) implies (X, W ) → Z

D. (X → Y and Y → Z ) implies X → Z
Your Answer: B;D Correct Answer: B;C;D Incorrect Time taken: 01min 20sec Discuss

Q #10 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Relation R has eight attributes ABCDEFGH . Fields of R contain only atomic values. F =
{CH→G, A→BC, B→CFH, E→A, F→EG} is a set of functional dependencies FDs( ) so that F +
is
exactly the set of FDs that hold for R.
How many candidate keys does the relation R have?
A. 3

B. 4

C. 5

D. 6

Your Answer: B Correct Answer: B Correct Time taken: 02min 54sec Discuss

You're doing Great!

Copyright & Stuff


Summary in Graph

Exam Summary (GO Classes GATE CS/DA | DBMS |


Normalization, Relational Model | Weekly Quiz 3)

Qs. Attempted: 0 Correct Marks: 0


0+0 0+0

Correct Attempts: 0 Penalty Marks: 0


0+0 0+0

Incorrect
Attempts:
0 Resultant Marks: 0
0+0 0+0

Total Questions: 15
5 + 10

Total Marks: 25
5 + 20

Exam Duration: 45 Minutes

Time Taken: 0 Minutes

EXAM RESPONSE EXAM STATS FEEDBACK

Technical

Q #1 Multiple Select Type Award: 1 Penalty: 0 Databases

Consider the following relation state for R ( A, B , C )

Which of the following dependencies may hold in the above relation?

A. AB → C
B. C → AB
C. B→C
D. AC → B

Your Answer: Correct Answer: B;D Not Attempted Time taken: 00min 00sec Discuss
Q #2 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Which of the following statements best describes the main reason for representing a relational database in
BCNF?

A. To achieve physical data independence.


B. To remove data anomalies (insertion, update, deletion anomalies).
C. To save space on disk.
D. To achieve logical data independence.

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #3 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Which of the following statements is/are true?

1. Each superkey is a superset of some candidate key.


2. Each primary key is also a candidate key, but there may be candidate keys that are not primary keys.

A. only 1 is true
B. only 2 is true
C. both 1 and 2 are true
D. neither 1 nor 2 are true

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Q #4 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Consider the relational scheme R(A, B, C, D, E, F, G, H) and the following functional dependencies over

R : A → BCD; AD → E; EFG → H; F → GH

Based on these functional dependencies, there is one key for R. One of these four functional dependencies
can be removed without altering the key. Which one?

A. A → BCD
B. AD → E
C. EFG → H
D. F → GH

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Q #5 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Consider the relational schema R(A B C D) with following functional dependency set
F = { A → BC C, → D }; The relation R is in

A. 2 NF
B. BCNF
C. 3 NF
D. 1 NF

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss
Q #6 Multiple Select Type Award: 2 Penalty: 0 Databases

Consider the relation R(A–––,–––


B , C, D, E, F) with {A, B} as a composite primary key and the following
dependencies:

{A, B} → C, D, E, F
E→D
C→F

Which of the following options are true? (Select all correct choices)

A. R is in 3NF (i.e. 3rd Normal Form)


B. R is in 2NF (i.e. 2nd Normal Form)
C. R is in 1NF (i.e. 1st Normal Form)
D. R is in 2NF but not in 3NF

Your Answer: Correct Answer: B;C;D Not Attempted Time taken: 00min 00sec Discuss

Q #7 Numerical Type Award: 2 Penalty: 0 Databases

Consider the following relational schema and set of functional dependencies. R(A, B, C , D, E) with
functional dependencies AB → E and D → C . Let X be the number of superkeys for this relation. Let Y be
the number of minimal superkeys for this relation. What is X + Y?

Your Answer: Correct Answer: 5 Not Attempted Time taken: 00min 02sec Discuss

Q #8 Multiple Select Type Award: 2 Penalty: 0 Databases

Consider a Relation R(ABCD). For which of the following set of functional dependencies (FDs), relation R is
in Boyce-Codd Normal Form (BCNF)?

A. BD → AC; AB → D; AC → B
B. A → C; B → AC; C → D.
C. A → BCD; B → ACD
D. BC → AD; D → B

Your Answer: Correct Answer: A;C Not Attempted Time taken: 00min 00sec Discuss

Q #9 Multiple Select Type Award: 2 Penalty: 0 Databases

R S C
Suppose and are two relations. Let be the referential integrity constraint that says: whenever has a R
v v v A A A
tuple with some values 1 , 2 , … , n in particular attributes 1 , 2 , … , n , there must be a tuple of that S
v v v B B
has the same values 1 , 2 , … , n in particular attributes 1 , 2 , … , n . B
Which of the following operations on R, S can cause violation of the constraint C?
A. Insert into R
B. Insert into S
C. Delete from R
D. Delete from S

Your Answer: Correct Answer: A;D Not Attempted Time taken: 00min 00sec Discuss
Q #10 Multiple Select Type Award: 2 Penalty: 0 Databases

Which one of the following statements about normal forms is FALSE?

A. BCNF is stricter than 3NF


B. Lossless, dependency-preserving decomposition into 3NF is always possible
C. Lossless, dependency-preserving decomposition into BCNF is always possible
D. Any relation with two attributes is in BCNF

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Q #11 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider the following functional dependencies in a database:

A→B
B→C
D→E
E→D
F →G
F →H
(E , F ) → I

The relation ( ,E D, A, B) is
A. 2 NF
B. 3 NF
C. BCNF
D. None of the above

Your Answer: Correct Answer: D Not Attempted Time taken: 00min 00sec Discuss

Q #12 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider the functional dependencies (FDs) of a relation R and below-mentioned properties:

P1: A non-prime attribute determines a different non-prime attribute.


P2: A proper subset of a candidate key determines a non-prime attribute.

Choose the correct option:

A. If some FD of R has property P1, R can't be in 2NF


B. If some FD of R has property P2, R can't be in 2NF
C. P1 and P2 won't affect R being in 2NF
D. If some FD of R has property P2, R can still be in 2NF

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #13 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Following table has two attributes Employee_id and Manager_id, where Employee_id is a primary key and
manager_id is a foreign key referencing Employee_id with on-delete cascade:
Employee_id Manager_id

20 40

25 40

30 35

35 20

40 45

45 25

On deleting the table (20, 40), the set of other tuples that must be deleted to maintain the referential
integrity of table is

A. (30, 35) only


B. (30, 35) and (35, 20) only
C. (35, 20) only
D. (40, 45) and (25, 40) only

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #14 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider the following relational schema and set of functional dependencies.

R(A, B, C, D, E) with functional dependencies ABC → D; CD → A; AD → E .

Which of the following is true?

R
A. is in 1NF but not in 2NF.
R
B. is in 2NF but not in 3NF.
C. R is in 3NF but not in BCNF.
D. R is in BCNF.

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss

Q #15 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

An attribute A is called prime if A is in any of the candidate keys. Assume in the following statements, A is an
attribute & X is a set of attributes.
Consider the following statements:

A. Domain of each attribute is an elementary type; that is, not a set or a record structure.

B. Whenever X ↦ A is a functional dependency that holds in relation R and A X , then either


A is prime, or
X is a key or a super-key for R.
X A
C. Whenever ↦ is a functional dependency that holds in relation R and A X , then either

A
is prime, or
X
is not a proper subset of any key for . R
X A
D. Whenever ↦ is a functional dependency that holds in relation R and A X , then

X
is a key or a super-key for . R
Which of the following is a correct match??

A. A – 1NF, B – 2NF, C – 3NF, D – BCNF


B. A – 1NF, B – BCNF, C – 2NF, D – 3NF
C. A – 1NF, B – 3NF, C – 2NF, D – BCNF
D. A – BCNF, B – 3NF, C – 2NF, D – 1NF

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Copyright & Stuff


Summary in Graph

Exam Summary (GO Classes GATE CS/DA | DBMS | Normal


Forms | Weekly Quiz 4)

Qs. Attempted: 0 Correct Marks: 0


0+0 0+0

Correct Attempts: 0 Penalty Marks: 0


0+0 0+0

Incorrect
Attempts:
0 Resultant Marks: 0
0+0 0+0

Total Questions: 15
5 + 10

Total Marks: 25
5 + 20

Exam Duration: 45 Minutes

Time Taken: 0 Minutes

EXAM RESPONSE EXAM STATS FEEDBACK

Technical

Q #1 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Match the following :

(1) Determinants (a) No attribute can be added

(2) Candidate key (b) Uniquely identified a row

(3) Non-redundancy (c) A constraint between two attribute

(4) Functional Dependency (d) Group of attributes on the left hand

side of arrow of function dependency.

A. 1-d, 2-b, 3-a, 4-c


B. 2-d, 3-a, 1-b, 4-c
C. 4-a, 3-b, 2-c, 1-d
D. 3-a, 4-b, 1-c, 2-d

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss

Q #2 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Which of the following statements is true?


D1 : The decomposition of the schema R(A, B, C) into R1 (A,B) and R2 (A,C) is always lossless
D2 : The decomposition of the schema R(A, B, C, D, E) having AD → B, C → DE, B → AE, and AE → C, into R1
(A,B, D) and R2 (A, C, D, E) is lossless

D
A. Both 1 and 2 D
D
B. Neither 1 nor D2
C. Only D1
D. Only D2

Your Answer: Correct Answer: D Not Attempted Time taken: 00min 00sec Discuss

Q #3 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Which one is correct w.r.t. RDBMS?

A. primary key ⊆ super key ⊆ candidate key


B. primary key ⊆ candidate key ⊆ super key
C. super key ⊆ candidate key ⊆ primary key
D. super key ⊆ primary key ⊆ candidate key

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #4 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

In relational database management, which of the following is/are property/properties of candidate key?

P: Uniqueness

Q: Irreducibility

A. P only
B. Q only
C. Both P and Q
D. Neither P nor Q

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Q #5 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Suppose R is a relation schema and F is a set of functional dependencies on R. Further, suppose R1 and
R2 form a decomposition of R. Then the decomposition is a lossless join decomposition of R provided that:

A. R1∩R2→R1 is in F+
B. R1∩R2→R2 is in F+
C. both R1∩R2→R1 and R1∩R2→R2 functional dependencies are in F+
D. at least one from R1∩R2→R1 and R1∩R2→R2 is in F+

Your Answer: Correct Answer: D Not Attempted Time taken: 00min 00sec Discuss

Q #6 Multiple Choice Type Award: 2 Penalty: 0.67 Databases


Which of the following is true?

A. A relation in BCNF is always in 3NF


B. A relation in 3NF is always in BCNF
C. BCNF and 3NF are same
D. A relation in BCNF is not in 3NF

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss

Q #7 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

The third normal form is based on the concept of_____

A. Closure Dependency
B. Transitive Dependency
C. Normal Dependency
D. Functional Dependency

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #8 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Armstrong (1974) proposed systematic approach to derive functional dependencies. Match the following
w.r.t functional dependencies:

List-I List -II

a. Decomposition Rule i. If X → Y and Z → W then {X, Z } → {Y , W }


b. Union rule ii. If X → Y and {Y , W } → Z then {X , W } → Z

c. Composition rule iii. If X → Y and X → Z then X → {Y , Z }

d. Psedudo transitivity rule iv. If X → {Y , Z } then X → Y and X → Z

Codes:

A. a-iii, b-ii, c-iv, d-i


B. a-i, b-iii, c-iv, d-ii
C. a-ii, b-i, c-iii, d-iv
D. a-iv, b-iii, c-i, d-ii

Your Answer: Correct Answer: D Not Attempted Time taken: 00min 00sec Discuss

Q #9 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider a relational schema S = ( U , V , W , X, Y , Z ) on which the following functional dependencies hold:


( U → V,VW → X, Y → W, X → U)
Which are the candidate keys among following options?

A. UY , V Y
B. UY , V Y , XY
C. UY Z , V Y Z , V WZ
D. UY Z , V Y Z , XY Z
Your Answer: Correct Answer: D Not Attempted Time taken: 00min 00sec Discuss

Q #10 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

R(A, B, C , D) along with the set of functional dependencies


The best normal form of relation scheme
F = {AB → C , AB → D, C → A, D → B} is
A. Boyce-Codd Normal form
B. Third Normal form
C. Second Normal form
D. First Normal form

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #11 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Identify the minimal key for relational scheme R(A, B, C , D, E) with functional dependencies
F = {A → B, B → C , AC → D}
A. A
B. AE
C. BE
D. CE

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #12 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Let R = ABCDE is a relational scheme with functional dependency set F = {A → B, B → C , AC → D}


. The attribute closures of A and E are

A. ABCD, ϕ
B. ABCD, E
C. Φ, ϕ
D. ABC , E

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #13 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

A relation R={A,B,C,D,E,F,G} is given with following set of functional dependencies: F={AD→E, BE→F, B→C,
AF→G}. Which of the following is a candidate key?

A. A
B. AB
C. ABC
D. ABD

Your Answer: Correct Answer: D Not Attempted Time taken: 00min 00sec Discuss
Q #14 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

For a database relation R(a, b, c, d), where the domains a, b, c, d include only atomic values, only the
following functional dependencies and those that can be inferred from them hold

a→c
b→d
This relation is

A. in first normal form but not in second normal form

B. in second normal form but not in first normal form

C. in third normal form

D. none of the above

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss

Q #15 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider the following relational schemas for a library database :

Book (Title, Author, Catalog_no, Publisher, Year, Price) Collection(Title, Author, Catalog_no) with the following
functional dependencies :

I. Title, Author → Catalog_no

II. Catalog_no → Title, Author, Publisher, Year

III. Publisher, Title, Year → Price Assume (Author, Title) is the key for both schemas. Which one of the
following is true ?

A. Both Book and Collection are in BCNF.


B. Both Book and Collection are in 3NF.
C. Book is in 2NF and Collection in 3NF.
D. Both Book and Collection are in 2NF.

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 02sec Discuss

Copyright & Stuff


Summary in Graph

Exam Summary (GO Classes GATE CS/DA | DBMS |


Normalization | Weekly Quiz 5)

Qs. Attempted: 0 Correct Marks: 0


0+0 0+0

Correct Attempts: 0 Penalty Marks: 0


0+0 0+0

Incorrect
Attempts:
0 Resultant Marks: 0
0+0 0+0

Total Questions: 10
5+5

Total Marks: 15
5 + 10

Exam Duration: 30 Minutes

Time Taken: 0 Minutes

EXAM RESPONSE EXAM STATS FEEDBACK

Technical

Q #1 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Which normal form is based on the concept of 'full functional dependency' is

A. First Normal Form


B. Second Normal Form
C. Third Normal Form
D. Fourth Normal Form

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #2 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Normalization from which is based on transitive dependency is classified as:

A. First normal form.


B. Second normal form.
C. Fourth normal form.
D. Third normal form.
Your Answer: Correct Answer: D Not Attempted Time taken: 00min 00sec Discuss

Q #3 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

A relational scheme is in..... if it is in 1NF and if all non prime attributes are fully functionally dependent on the
relation key

A. Second Normal Form


B. Boyce Codd Normal Form
C. Fourth Normal Form
D. First Normal Form

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss

Q #4 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

R(MNPQ) and functional dependencies M → N , P → Q. Then the decomposition of


Consider a schema
R into R (MN ) and R (PQ) is __________.
1 2

A. Dependency preserving but not lossless join


B. Dependency preserving and lossless join
C. Lossless join but not dependency preserving
D. Neither dependency preserving nor lossless join.

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss

Q #5 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Consider the following dependencies and the BOOK table in a relational database design. Determine the
normal form of the given relation.

ISBN → Title

ISBN → Publisher

Publisher → Address

A. First Normal Form


B. Second Normal Form
C. Third Normal Form
D. BCNF

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 02sec Discuss

Q #6 Multiple Select Type Award: 2 Penalty: 0 Databases

R(A, B, C , D) satisfy the following functional dependencies:


Let relation
A → B, B → C , C → A
Call this set S1. A different set S2 of functional dependencies is equivalent to S1 if exactly the same FDs follow
from S1 and S2. Which of the following sets of FDs is equivalent to the set above?

A. B → A, B → C, C → B
B. A → BC, C → AB
C. A → BC, B → AC
D. C → B, B → A, A → C

Your Answer: Correct Answer: D Not Attempted Time taken: 00min 00sec Discuss

Q #7 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider the following table

The table is in which normal form?

A. First Normal Form


B. Second Normal Form
C. Third Normal Form but not BCNF
D. Third Normal Form and BCNF

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Q #8 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider a relational table R that is in 3NF , but not in BCNF. Which one of the following statements is
TRUE?

A. R has a nontrivial functional dependency X → A, where X is not a superkey and A is a prime


attribute.
R
B. has a nontrivial functional dependency → , where X A X is not a superkey and A is a non-prime
attribute and X
is not a proper subset of any key.
R
C. has a nontrivial functional dependency → , where X A X is not a superkey and A is a non-prime
attribute and X
is a proper subset of some key
R
D. A cell in holds a set instead of an atomic value.

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss

Q #9 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

pk(R) denotes primary key of relation R. A many-to-one relationship that exists between two relations
Let
R and R can be expressed as follows:
1 2

A. pk(R ) → pk(R )2 1

B. pk(R ) → pk(R )1 2

C. pk(R ) → R ∩ R 2 1 2

D. pk(R ) → R ∩ R 1 1 2
Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #10 Numerical Type Award: 2 Penalty: 0 Databases

Suppose relation R(A, B, C , D, E) has the functional dependencies:


A → B; BC → D; BE → C; AD → E; CE → A
Let the number of candidate keys of R be M .
Of the five given FDs, let the number of FDs that violate the BCNF condition be N .
What is M + N ??

Your Answer: Correct Answer: 7 Not Attempted Time taken: 00min 00sec Discuss

Copyright & Stuff


Summary in Graph

Exam Summary (GO Classes GATE CS/DA | DBMS | SQL |


Weekly Quiz 6)

Qs. Attempted: 8 Correct Marks: 4


4+4 2+2

Correct Attempts: 3 Penalty Marks: 2.33


2+1 0.33 + 2

Incorrect
Attempts:
5 Resultant Marks: 1.67
2+3 1.67 + 0

Total Questions: 10
5+5

Total Marks: 15
5 + 10

Exam Duration: 30 Minutes

Time Taken: 13 Minutes

EXAM RESPONSE EXAM STATS FEEDBACK

Technical

Q #1 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

How do you select all columns from a table named "Employees"?

A. SELECT * FROM Employees;


B. SELECT all FROM Employees;
C. SELECT columns FROM Employees;
D. SELECT Employees. * ;

Your Answer: A Correct Answer: A Correct Time taken: 00min 11sec Discuss

Q #2 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Which SQL statement is used to retrieve distinct values from a column?

A. SELECT UNIQUE column_name FROM table_name;


B. SELECT DIFFERENT column_name FROM table_name;
C. SELECT DISTINCT column_name FROM table_name;
D. SELECT ONLY column_name FROM table_name;
Your Answer: C Correct Answer: C Correct Time taken: 00min 23sec Discuss

Q #3 Multiple Select Type Award: 1 Penalty: 0 Databases

Which of the following statements is/are false?

A. Relational algebra and SQL are declarative languages.


B. The difference between sets and bags is that sets don't allow repeated values.
C. In a table with primary key (A, B), every value of A must be unique.
D. Given a relational schema, there is only one way to translate a given English query against that schema's
data into a correct SQL query.

Your Answer: A;D Correct Answer: A;C;D Incorrect Time taken: 02min 06sec Discuss

Q #4 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Which of the following is/are correct?

A. An SQL query automatically eliminates duplicates


B. An SQL query will not work if there are no indexes on the relations
C. SQL permits attribute names to be repeated in the same relation
D. None of the above

Your Answer: C Correct Answer: D Incorrect Time taken: 00min 51sec Discuss

Q #5 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Consider the following ORACLE relations :

One (x, y) = {< 2, 5 >, < 1, 6 >, < 1, 6 >, < 1, 6 >, < 4, 8 >, < 4, 8 >}

Two (x, y) = {< 2, 55 >, < 1, 1 >, < 4, 4 >, < 1, 6 >, < 4, 8 >, < 4, 8 >, < 9, 9 >, < 1, 6 >}

Consider the following two SQL queries SQ1 and SQ2 :

SQ1 :

SELECT * FROM One)

EXCEPT

(SELECT * FROM Two);

SQ2 :

SELECT * FROM One)

EXCEPT ALL

(SELECT * FROM Two);

For each of the SQL queries, what is the cardinality (number of rows) of the result obtained when applied to
the instances above ?

A. 2 and 1 respectively
B. 1 and 2 respectively
C. 2 and 2 respectively
D. 1 and 1 respectively
Your Answer: Correct Answer: B Not Attempted Time taken: 01min 35sec Discuss

Q #6 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider the following three SQL queries (Assume the data in the people table):

i. Select Name from people where Age > 21;


ii. Select Name from people where Height > 180;
iii. Select Name from people where (Age > 21) or (Height > 180) ;

If the SQL queries a and b above, return 10 rows and 7 rows in the result set respectively, then what is one
possible number of rows returned by the SQL query c?

A. 3
B. 7
C. 10
D. 21

Your Answer: C Correct Answer: C Correct Time taken: 01min 54sec Discuss

Q #7 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Given relations r(w, x) and s(y, z) the result of

select distinct w, x
from r, s

is guaranteed to be same as r, provided.

A. r has no duplicates and s is non-empty


B. r and s have no duplicates
C. s has no duplicates and r is non-empty
D. r and s have the same number of tuples

Your Answer: D Correct Answer: A Incorrect Time taken: 01min 40sec Discuss

Q #8 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider a database table T containing two columns X and Y each of type integer. After the creation of the
table, one record (X=1, Y=1) is inserted in the table.

Let MX and MY denote the respective maximum values of X and Y among all records in the table at any
point in time. Using MX and MY, new records are inserted in the table 128 times with X and Y values being
MX+1, 2*MY+1 respectively. It may be noted that each time after the insertion, values of MX and MY

change.

What will be the output of the following SQL query after the steps mentioned above are carried out?

SELECT Y FROM T WHERE X=7;

A. 127
B. 255
C. 129
D. 257
Your Answer: Correct Answer: A Not Attempted Time taken: 00min 06sec Discuss

Q #9 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

The SQL expression

Select distinct T.branch_name from branch T, branch S


where T.assets>S.assets and S.branch_city = “Mumbai”

finds the names of

A. All branches that have greater assets than some branch located in Mumbai
B. All branches that have greater assets than all branches in Mumbai
C. The branch that has greatest asset in Mumbai
D. Any branch that has greater assets than any branch in Mumbai

Your Answer: B Correct Answer: A Incorrect Time taken: 03min 01sec Discuss

Q #10 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider the set of relations shown below and the SQL query that follows.

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 = 'A'

Which of the following sets is computed by the above query?

A. Names of students who have got an A grade in all courses taught by Korth
B. Names of students who have got an A grade in all courses

C. Names of students who have got an A grade in at least one of the courses taught by Korth

D. None of the above

Your Answer: A Correct Answer: C Incorrect Time taken: 01min 29sec Discuss

Copyright & Stuff


Summary in Graph

Exam Summary (GO Classes GATE CS/DA | DBMS | SQL |


Weekly Quiz 7)

Qs. Attempted: 0 Correct Marks: 0


0+0 0+0

Correct Attempts: 0 Penalty Marks: 0


0+0 0+0

Incorrect
Attempts:
0 Resultant Marks: 0
0+0 0+0

Total Questions: 10
5+5

Total Marks: 15
5 + 10

Exam Duration: 30 Minutes

Time Taken: 0 Minutes

EXAM RESPONSE EXAM STATS FEEDBACK

Technical

Q #1 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

A relational database contains two tables student and department in which student table has columns roll_no,
name and dept_id and department table has columns dept_id and dept_name. The following insert
statements were executed successfully to populate the empty tables:

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

A. 0 row and 4 columns


B. 3 rows and 4 columns
C. 3 rows and 5 columns
D. 6 rows and 5 columns

Your Answer: Correct Answer: D Not Attempted Time taken: 00min 00sec Discuss
Q #2 Numerical Type Award: 1 Penalty: 0 Databases

Consider the following relation:

Performance

Student
Roll_No Course Marks
––––––––––– –––––––––

Roll_No Student_Name
–––––––––––
1 Math 80

1 English 70
1 Raj
2 Math 75
2 Rohit
3 English 80
3 Raj
2 Physics 65

3 Math 80

Consider the following SQL query.

SELECT S.Student_Name, Sum(P. Marks)


FROM Student S, Performance P
WHERE S.Roll_No= P.Roll_No
GROUP BY S.STUDENT_Name

The numbers of rows that will be returned by the SQL query is_________________.

Your Answer: Correct Answer: 2 Not Attempted Time taken: 00min 02sec Discuss

Q #3 Numerical Type Award: 1 Penalty: 0 Databases

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

Table: Performance
Table: student
Roll_no Subject_code Marks
Roll_no Student_name
1 A 86
1 Amit
1 B 95
2 Priya
1 C 90
3 Vinit
2 A 89
4 Rohan
2 C 92
5 Smita
3 C 80

The primary key of the Student table is Roll_no. For the performance table, the columns Roll_no. and
Subject_code together form 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 ________

Your Answer: Correct Answer: 5 Not Attempted Time taken: 00min 00sec Discuss

Q #4 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

A relational schema for a train reservation database is given below.

passenger(pid, pname, age)


reservation(pid, class, tid)
Reservation

Passenger

pid class tid


pid pname Age 0 AC 8200
0 Sachine 65 1 AC 8201
1 Rahul 66 2 SC 8201
2 Sourav 67 5 AC 8203
3 Anil 69 1 SC 8204
3 AC 8202

What pids are returned by the following SQL query for the above instance of the tables?

SELECT pid
FROM Reservation
WHERE class='AC' AND
EXISTS (SELECT *
FROM Passenger
WHERE age>65 AND
Passenger.pid=Reservation.pid)

A. 1, 0
B. 1, 2
C. 1, 3
D. 1, 5

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Q #5 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Suppose we have a relation R(A, B) with one tuple, both of whose components are NULL:

The result of:

A. (NULL,NULL)
B. (NULL,0)
C. (NULL, 1)
D. Empty Table

Your Answer: Correct Answer: Not Attempted Time taken: 00min 00sec Discuss

Q #6 Numerical Type Award: 2 Penalty: 0 Databases

Consider the following table named Student in a relational database. The primary key of this table is
rollNum.
Student
rollNum name gender marks
–––––––––
1 Naman M 62
2 Aliya F 70
3 Aliya F 80
4 James M 82
5 Swati F 65

The SQL query below is executed on this database.

SELECT *
FROM Student
WHERE gender = 'F' AND
marks > 65;

The number of rows returned by the query is ___________.

Your Answer: Correct Answer: 2 Not Attempted Time taken: 00min 00sec Discuss

Q #7 Numerical Type Award: 2 Penalty: 0 Databases

Consider the following two tables named Raider and Team in a relational database maintained by a Kabaddi
league. The attribute ID in table Team references the primary key of the Raider table, ID.

Raider
ID Name Raids RaidPoints
1 Arjun 200 250
2 Ankush 190 219
3 Sunil 150 200
4 Reza 150 190
5 Pratham 175 220
6 Gopal 193 215

Team
City ID BidPoints
Jaipur 2 200
Patna 3 195
Hyderabad 5 175
Jaipur 1 250
Patna 4 200
Jaipur 6 200

The SQL query described below is executed on this database:


SELECT *
FROM Raider, Team
WHERE Raider.ID=Team.ID AND City="Jaipur" AND
RaidPoints > 200;

The number of rows returned by this query is ________.

Your Answer: Correct Answer: 3 Not Attempted Time taken: 00min 00sec Discuss
Q #8 Multiple Select Type Award: 2 Penalty: 0 Databases

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/are not equivalent?

A. x = 5 not(not(x = 5))
B. x = 5 x > 4 and x < 6, where x is an integer
C. x ≠ 5 not(x = 5)
D. none of the above

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Q #9 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

The employee information in a company is stored in the relation

Employee (name, sex, salary, deptName)

Consider the following SQL query

Select deptName
From Employee
Where sex = ‘M’
Group by deptName
5. Having avg(salary) >
(select avg (salary) from Employee)

It returns the names of the department in which

A. the average salary is more than the average salary in the company

B. the average salary of male employees is more than the average salary of all male employees in the
company

C. the average salary of male employees is more than the average salary of employees in same the
department

D. the average salary of male employees is more than the average salary in the company

Your Answer: Correct Answer: D Not Attempted Time taken: 00min 00sec Discuss

Q #10 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider the following relational schema:

Suppliers(sid:integer , sname:string, city:string, street:string)


––––––––––––

Parts(pid:integer , pname:string, color:string)


––––––––––––

Catalog(sid:integer, pid:integer , cost:real)


–––––––––––––––––––––––––

Consider the following relational query on the above database:

SELECT S.sname
FROM Suppliers S
WHERE S.sid NOT IN (SELECT C.sid
FROM Catalog C
WHERE C.pid NOT IN (SELECT P.pid
FROM Parts P
WHERE P.color<>'blue'))
Assume that relations corresponding to the above schema are not empty. Which one of the following is the
correct interpretation of the above query?

A. Find the names of all suppliers who have supplied a non-blue part.

B. Find the names of all suppliers who have not supplied a non-blue part.

C. Find the names of all suppliers who have supplied only non-blue part.

D. Find the names of all suppliers who have not supplied only blue parts.

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Copyright & Stuff


Summary in Graph

Exam Summary (GO Classes GATE CS/DA | DBMS | SQL |


Weekly Quiz 8)

Qs. Attempted: 6 Correct Marks: 7


4+2 3+4

Correct Attempts: 5 Penalty Marks: 0.33


3+2 0.33 + 0

Incorrect
Attempts:
1 Resultant Marks: 6.67
1+0 2.67 + 4

Total Questions: 10
5+5

Total Marks: 15
5 + 10

Exam Duration: 30 Minutes

Time Taken: 30 Minutes

EXAM RESPONSE EXAM STATS FEEDBACK

Technical

Q #1 Multiple Select Type Award: 1 Penalty: 0 Databases

Given the following table "scores".

What is the result of the following SQL query:


SELECT Score1, Score2 FROM Scores
Which of the following rows is/are in the answer?

A. (1, 2)
B. (5, 3)
C. (8, 6)
D. (6, 4)
Your Answer: B Correct Answer: B Correct Time taken: 01min 36sec Discuss

Q #2 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Given the following table Scores(Team, Opponent, RunsFor, RunsAgainst) and query.

SELECT * FROM Scores WHERE RunsFor > 5


Which tuple is in the result?

A. (Swallows, Carp, 6, 4)
B. (Swallows, Carp, 4)
C. (12)
D. Empty Table

Your Answer: A Correct Answer: A Correct Time taken: 01min 47sec Discuss

Q #3 Multiple Choice Type Award: 1 Penalty: 0.33 Databases


Consider the relation: Scores(Team, Opponent, RunsFor, RunsAgainst) and the query:

SELECT DISTINCT Team, RunsFor FROM Scores

Which is true:

A. 1 appears once
B. 5 appears twice
C. 6 appears 4 times
D. All are true.

Your Answer: B Correct Answer: B Correct Time taken: 01min 48sec Discuss

Q #4 Multiple Choice Type Award: 1 Penalty: 0.33 Databases


Determine the result of:
SELECT COUNT(*), COUNT(Runs)
FROM Scores
WHERE Team = 'Carp'
Which of the following is in the result:

A. (1, 0)
B. (2, 0)
C. (2, NULL)
D. (0, 0)

Your Answer: C Correct Answer: B Incorrect Time taken: 00min 42sec Discuss

Q #5 Multiple Select Type Award: 1 Penalty: 0 Databases

Given:

Compute:
SELECT R.A, R.B, S.B, S.C, S.D
FROM R FULL OUTER JOIN S ON (R.A > S.B AND R.B = S.C)
Which of the following tuples of R or S is/are dangling (and therefore needs to be padded in the outer join)?
A. (1, 2) of R
B. (3, 4) of R
C. (2, 4, 6) of S
D. (4, 7, 9) of S

Your Answer: Correct Answer: A;D Not Attempted Time taken: 01min 31sec Discuss

Q #6 Multiple Select Type Award: 2 Penalty: 0 Databases

Compute the results.


Which of the following is/are true:

A. (0, 1, 1, 0) appears twice.


B. (1, 1, 0, 1) does not appear.
C. (1, 1, 1, 0) appears once.
D. (1, 1, 1, 1) does not appear.

Your Answer: A;D Correct Answer: A;D Correct Time taken: 04min 07sec Discuss

Q #7 Numerical Type Award: 2 Penalty: 0 Databases

Compute the results.


The number of tuples in the output is?

Your Answer: Correct Answer: 16 Not Attempted Time taken: 01min 42sec Discuss

Q #8 Multiple Select Type Award: 2 Penalty: 0 Databases

Relation R has schema R(a, b, c).


SELECT a, b, c
FROM R
ORDER BY c DESC, b ASC;
t
In the result of the above query, what condition must a tuple satisfy so that t necessarily precedes the tuple
(5, 5, 5) ?
Identify such tuples from the list below.

A. (3, 6, 3)
B. (1, 5, 5)
C. (5, 5, 6)
D. (3, 3, 5)

Your Answer: Correct Answer: C;D Not Attempted Time taken: 01min 59sec Discuss

Q #9 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider the following SQL query: SELECT DISTINCT s1.sname, s1.age FROM student s1, student s2 WHERE
s1.age > s2.age This query returns A: The name and age of one of the oldest student(s) B: The name and age
of all of the oldest student(s) C : The name and age of all of the youngest student(s) D: The name and age of
all students that are older than the youngest student(s)

Your Answer: D Correct Answer: D Correct Time taken: 01min 36sec Discuss

Q #10 Numerical Type Award: 2 Penalty: 0 Databases

Compute the result of the following query on the above table Arc(x, y):

SELECT a1.x, a2.y, COUNT(*)


FROM Arc a1, Arc a2
WHERE a1.y = a2.x
GROUP BY a1.x, a2.y

The number of tuples in the output is?

Your Answer: Correct Answer: 6 Not Attempted Time taken: 13min 07sec Discuss

Copyright & Stuff


Summary in Graph

Exam Summary (GO Classes GATE CS/DA | DBMS |


Normalization | Weekly Quiz 9)

Qs. Attempted: 0 Correct Marks: 0


0+0 0+0

Correct Attempts: 0 Penalty Marks: 0


0+0 0+0

Incorrect
Attempts:
0 Resultant Marks: 0
0+0 0+0

Total Questions: 10
5+5

Total Marks: 15
5 + 10

Exam Duration: 30 Minutes

Time Taken: 0 Minutes

EXAM RESPONSE EXAM STATS FEEDBACK

Technical

Q #1 Numerical Type Award: 1 Penalty: 0 Databases

Suppose R is a relation with attributes A1, A2, ... , A6.


How many superkeys R has, if the only keys are A1 and A2?

Your Answer: Correct Answer: 48 Not Attempted Time taken: 00min 00sec Discuss

Q #2 Numerical Type Award: 1 Penalty: 0 Databases

Suppose R is a relation with attributes A1, A2, ... , A6.


How many superkeys R has, if the only keys are {A1, A2} and {A3, A4} ?

Your Answer: Correct Answer: 28 Not Attempted Time taken: 00min 02sec Discuss

Q #3 Numerical Type Award: 1 Penalty: 0 Databases

Suppose R is a relation with attributes A1, A2, ... , A6.


R
How many superkeys has, if the only keys are {A1, A2} and {A1, A3} ?
Your Answer: Correct Answer: 24 Not Attempted Time taken: 00min 00sec Discuss

Q #4 Multiple Select Type Award: 1 Penalty: 0 Databases

We say a set of attributesX is closed (with respect to a given set of FD's) if X = X. +

For which of the following set of functions dependencies does the relation R(A, B, C , D) has AB, CD as
closed sets?

A. A → B , B → A, C → D
B. A → B, B → C , C → D, D → A
C. A → B, B → A, C → A, D → A
D. A → B, B → A, C → D, D → C

Your Answer: Correct Answer: A;D Not Attempted Time taken: 00min 00sec Discuss

Q #5 Numerical Type Award: 1 Penalty: 0 Databases

Consider a relation with attributes R(A, B, C, D, E) that satisfies the following functional dependencies:
AC → B
BD → C
CE → D
DA → E
EB → A
What is the number of keys that contain the attribute A?

Your Answer: Correct Answer: 3 Not Attempted Time taken: 00min 00sec Discuss

Q #6 Multiple Select Type Award: 2 Penalty: 0 Databases

LetX Y
and be sets of attributes.
Which of the following statements is/are true?

A. If a relation has no attribute that is functionally determined by all the other attributes combined, then
the relation has no nontrivial FD's at all.
B. If X ⊆ Y, then X+ ⊆ Y+ (where the closures are taken with respect to the same set of FD's)
X
C. ( + ) = +
+
X
D. If AB → C and A → C , then B → C .

Your Answer: Correct Answer: A;B;C Not Attempted Time taken: 00min 00sec Discuss

Q #7 Numerical Type Award: 2 Penalty: 0 Databases

Consider a relation with schema R(A, B, C, D) and FD's AB → C, C → D, and D → A.


What are all the nontrivial FD's that follow from the given FD's ? You should restrict yourself to FD's with
single attributes on the right side.

Your Answer: Correct Answer: 14 Not Attempted Time taken: 00min 00sec Discuss
Q #8 Multiple Select Type Award: 2 Penalty: 0 Databases

In a relational database relation, we say a non-empty set of attributes X is closed (with respect to a given set
of functional dependencies FD) if + = X X X X
(where + is the closure of ). Consider a relation with schema
R{A, B, C, D) and an unknown set of FD's.

If we are told which sets of attributes are closed, we can discover the FD's.

Assume that the only closed sets are {A, B}, {A, B, C, D}.

Which of the following is/are true for R?


A. The number of candidate keys is 2.
B. The number of non-prime attributes is 2.
R
C. is in 2 NF.
D. R is in 3NF .

Your Answer: Correct Answer: A;B;C Not Attempted Time taken: 00min 00sec Discuss

Q #9 Multiple Select Type Award: 2 Penalty: 0 Databases

Consider a relation R{A, B, C) such that each attribute functionally determines the other two attributes.
Relation R and its FD's have several minimal bases.
Which of the following is/are a minimal base (canonical cover) for FDs of R ?

A. A → B, B → A, B → C, C → B
B. A → B, B → C, C → A
C. A → C, B → C, C → A, C → B
D. A → C, B → C, C → A

Your Answer: Correct Answer: A;B;C Not Attempted Time taken: 00min 00sec Discuss

Q #10 Multiple Select Type Award: 2 Penalty: 0 Databases

R(A, B, C , D, E) with functional dependencies AB → C , BC → D, CD → E, DE → A,


Consider relation
and AE → B. If we project R onto the relation S (A, B, C , D), that is, S = πA B C D (R), then certain
, , ,

functional dependencies must hold in S. These are the FD's that can be inferred from those of R, but that
involve only the attributes of S. Note that the inference itself is not restricted only to attributes of S, just the
result. Which of the following FD's holds in S?

A. AC → B
B. DE → A
C. B → A
D. ABD → C

Your Answer: Correct Answer: D Not Attempted Time taken: 00min 00sec Discuss

Copyright & Stuff


Summary in Graph

Exam Summary (GO Classes GATE CS/DA | DBMS |


Relational Algebra | Weekly Quiz 10)

Qs. Attempted: 0 Correct Marks: 0


0+0 0+0

Correct Attempts: 0 Penalty Marks: 0


0+0 0+0

Incorrect
Attempts:
0 Resultant Marks: 0
0+0 0+0

Total Questions: 10
5+5

Total Marks: 15
5 + 10

Exam Duration: 30 Minutes

Time Taken: 0 Minutes

EXAM RESPONSE EXAM STATS FEEDBACK

Technical

Q #1 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

R
Consider the join of a relation with a relation S. If R has m tuples and S has n tuples then the maximum
and minimum sizes of the join respectively are

A.m + n and 0
B.mn and 0
C.m + n and |m − n|
D. mn and m + n

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #2 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

The relation schema, Person (pid, city), describes the city of residence for every person uniquely identified by
pid. The following relational algebra operators are available: selection, projection, cross product, and rename.

3
To find the list of cities where at least persons reside, using the above operators, the minimum number of
cross product operations that must be used is

A. 1
B. 2
C. 3
D. 4

Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss

Q #3 Numerical Type Award: 1 Penalty: 0 Databases

Consider the following two relations, R(A, B) and S(A, C ):


R
A B
10 20
20 30
30 40
30 50
50 95

S
A C
10 90
30 45
40 80

The total number of tuples obtained by evaluating the following expression

σB < C ( R ⋈ R. A = S . A S) is ___________.

Your Answer: Correct Answer: 2 Not Attempted Time taken: 00min 00sec Discuss

Q #4 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Given two union compatible relations R (A, B) and R (C , D), what is the result of the operation
1 2

R 1 ⋈ A = C ∧ B= D R? 2

A. R ∪R1 2

B. R × R
1 2

C. R – R
1 2

D. R ∩ R
1 2

Your Answer: Correct Answer: D Not Attempted Time taken: 00min 00sec Discuss

Q #5 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

π π σ σ r
What is the optimized version of the relation algebra expression A1 ( A2 ( F 1 ( F 2 ( )))), where 1, 2 are A A
r A A F F
sets of attributes in with 1 ⊂ 2 and 1, 2 are Boolean expressions based on the attributes in ? r
π σ
A. A1 ( (F 1∧F 2) ( )) r
π σ
B. A1 ( (F 1∨F 2) ( )) r
C. πA (σ F
2 F
( 1∧ 2) (r))
D. πA (σ F
2 ( 1∨F 2) (r))

Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss

Q #6 Numerical Type Award: 2 Penalty: 0 Databases

Consider the following relations P (X, Y , Z), Q(X, Y , T ) and R(Y , V ).


Table: P Table: Q Table: R

X Y Z X Y T Y V

X1 Y1 Z1 X2 Y1 2 Y1 V1
X1 Y1 Z2 X1 Y2 5 Y3 V2
X2 Y2 Z2 X1 Y1 6 Y2 V3
X2 Y4 Z4 X3 Y3 1 Y2 V2

How many tuples will be returned by the following relational algebra query?
Πx ( σPY RY RV V
( . = . ∧ . = 2)) ( P × R))– Πx (σ Q Y ( R Y Q.T >2)) (Q × R)) Answer: ________
. = . ∧

Your Answer: Correct Answer: 1 Not Attempted Time taken: 00min 00sec Discuss

Q #7 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

The following relation records the age of 500 employees of a company, where empNo (indicating the
employee number) is the key:

empAge(empNo
––––––––
, age)

Consider the following relational algebra expression:

ΠempNo ( empAge ⋈ age ( > age1) ρempNo1,age1 (empAge))

What does the above expression generate?

A. Employee numbers of only those employees whose age is the maximum


B. Employee numbers of only those employees whose age is more than the age of exactly one other
employee
C. Employee numbers of all employees whose age is not the minimum
D. Employee numbers of all employees whose age is the minimum

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Q #8 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider a database that includes the following relations:

Defender(name, rating, side, goals)


Forward(name, rating, assists, goals)
Team(name, club, price)

Which ONE of the following relational algebra expressions checks that every name occurring in Team appears
ϕ
in either Defender or Forward, where denotes the empty set?

A. Πname ( Team )∖ (Πname ( Defender )∩Πname ( Forward )) = ϕ


B. (Πname ( Defender )∩Πname ( Forward )) ∖Πname ( Team )= ϕ
C. Πname ( Team )∖ (Π ( Defender )∪Π
name ( Forward )) = ϕ
name

D. (Πname ( Defender )∪Π ( Forward )) ∖Π


name ( Team )= ϕ name

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Q #9 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

In a relational database there are three relations:

Customers = C (CName) ,
Shops = S (SName) ,
Buys = B (CName, SName) .

Which of the following relational algebra expressions returns the names of shops that have no customers
at all? [Here Π is the projection operator.]

A. Π SName B
S B
B. −
C. S − Π SName B
D. S − Π SName (( C × S ) − B)

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 02sec Discuss

Q #10 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

In a relational database there are three relations:

Customers = C (CName)

Shops = S (SName)

Buys = B (CName, SName)

Then the Relational Algebra expression ( Π is the projection operator).

C−Π CName (( C × S ) − B)
returns the names of

A. Customers who buy from at least one shop.


B. Customers who buy from at least two shops.
C. Customers who buy from all shops.
D. Customers who do not buy buy anything at all.

Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss

Copyright & Stuff


Summary in Graph

Exam Summary (GO Classes GATE CS/DA | DBMS |


Relational Algebra | Weekly Quiz 11)

Qs. Attempted: 8 Correct Marks: 8


4+4 4+4

Correct Attempts: 6 Penalty Marks: 0.67


4+2 0 + 0.67

Incorrect
Attempts:
2 Resultant Marks: 7.33
0+2 4 + 3.33

Total Questions: 10
5+5

Total Marks: 15
5 + 10

Exam Duration: 30 Minutes

Time Taken: 16 Minutes

EXAM RESPONSE EXAM STATS FEEDBACK

Technical

Q #1 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Consider the following schemas:

Branch=(Branch-name, Assets, Branch-city)

Customer = (Customer-name, Bank name, Customer-city)

Borrow = (Branch-name, Loan number, Customer account-number)

Deposit = (Branch-name, Account-number, Customer-name, Balance)

Using relational Algebra, the Query that finds customers who have balance more than 10,000 is _____

A.πcustomer −name (σbalance>10000 Deposit )


( )

B. σcustomer −name (σbalance>10000 Deposit )


( )

C. πcustomer −name (σbalance>10000 Borrow )


( )

D. σcustomer −name (πbalance>10000 Borrow )


( )

Your Answer: A Correct Answer: A Correct Time taken: 01min 04sec Discuss
Q #2 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

With respect to relational algebra, which of the following operations are included from mathematical set
theory?

i. Join
ii. Intersection
iii. Cartisian product
iv. Project
A. i and iv
B. ii and iii
C. iii and iv
D. ii and iv

Your Answer: B Correct Answer: B Correct Time taken: 02min 47sec Discuss

Q #3 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Given the relations

employee (name, salary, dept-no), and


department (dept-no, dept-name,address),

Which of the following queries cannot be expressed using the basic relational algebra operations
(σ, π, ×, ⋈, ∪, ∩, −)?

A. Department address of every employee


B. Employees whose name is the same as their department name
C. The sum of all employees' salaries
D. All employees of a given department

Your Answer: C Correct Answer: C Correct Time taken: 01min 32sec Discuss

Q #4 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

Which operation is used to extract specified columns from a table?

A. Project
B. Join
C. Extract
D. Substitute

Your Answer: A Correct Answer: A Correct Time taken: 00min 15sec Discuss

Q #5 Multiple Choice Type Award: 1 Penalty: 0.33 Databases

The join operation can be defined as

A. a cartesian product of two relations followed by a selection


B. a cartesian product of two relations
C. a union of two relations followed by cartesian product of the two relations
D. a union of two relations
Your Answer: Correct Answer: A Not Attempted Time taken: 01min 50sec Discuss

Q #6 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider the relations R(A, B) and S(B, C ) and the following four relational algebra queries over R ans S
π R S
I. A,B ( ⋈ )
R π S
II. ⋈ B ( )
R π R π S
III. ∩ ( A ( ) × B ( ))
R S R B refers to the column B in table R
IV. ΠA.R.B ( × ) where .

One can determine that:

A. I, III and IV are the same query


B. II, III and IV are the same query
C. I, II and IV are the same query
D. I, II and III are the same query

Your Answer: Correct Answer: D Not Attempted Time taken: 00min 45sec Discuss

Q #7 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Let R and S be two relations with the following schema

R(P , Q , R1, R2, R3)


–––––

S(P , Q , S1, S2)


–––––

where { ,P Q} is the key for both schemas. Which of the following queries are equivalent?
I. ΠP ( R ⋈ S)
R
II. ΠP ( ) ⋈ ΠP ( ) S
R
III. ΠP (ΠP ,Q ( ) ∩ ΠP ,Q ( )) S
R R
IV. ΠP (ΠP ,Q ( ) − (ΠP ,Q ( ) − ΠP ,Q ( ))) S
A. Only I and II
B. Only I and III
C. Only I, II and III
D. Only I, III and IV

Your Answer: D Correct Answer: D Correct Time taken: 03min 00sec Discuss

Q #8 Multiple Select Type Award: 2 Penalty: 0 Databases

Consider the following relation schemas:


RAB SBC T CD
( , ), ( , ), ( , ).
Check equivalences that are correct under set semantics.

A. R⋈R≡R
B. R ∪ (S − R) ≡ S ∪ R
C. (R ∪ S ) − T ≡ R ∪ (S − T )
D. πA (R ⟕ S ) ≡ πA (S ⟖ R)

Your Answer: A;C;D Correct Answer: A;B;D Incorrect Time taken: 02min 50sec Discuss

Q #9 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Suppose that two relations R(A, B) and S(A, B) have exactly the same schema. Consider the following
equalities in relational algebra?

I. R ∩ S = R − (R − S )
II. R ∩ S = S − (S − R)
III. R ∩ S = R NATURAL-JOIN S
IV. R ∩ S = R × S

Which of the equalities hold in relational algebra?


A. I only
B. I and II only
C. I, II and III
D. I, II, III and IV

Your Answer: C Correct Answer: C Correct Time taken: 00min 28sec Discuss

Q #10 Multiple Choice Type Award: 2 Penalty: 0.67 Databases

Consider the following instances:

Which of the following relational operations will produce the following tuple only?

A. ( QB1 ∪QB2) × (QB2 ∪ QB1)


B. ( QB1 − QB2) ∩ (QB2 − QB1)
C. ( QB1 −QB2) × (QB2 − QB1)
D. ( QB1 ∩ QB2) − (QB2 ∩ QB1)

Your Answer: B Correct Answer: C Incorrect Time taken: 01min 25sec Discuss

You're doing good, you can target above 70


percentage!
Copyright & Stuff

You might also like