Database
Database
Incorrect
Attempts:
5 Resultant Marks: 0.67
2+3 0.67 + 0
Total Questions: 15
5 + 10
Total Marks: 25
5 + 20
Technical
What does physical data independence allow the database administrator to do?
Your Answer: C Correct Answer: B Incorrect Time taken: 00min 23sec Discuss
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
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
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
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
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 :
Your Answer: 8 Correct Answer: 16 Incorrect Time taken: 03min 19sec Discuss
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
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}.
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
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
A. {A → B, B → CD, CD → A}
B. {A → CD, B → A, CD → B}
C. {A → BCD, B → A, CD → A}
Your Answer: Correct Answer: A;B;C;D Not Attempted Time taken: 00min 58sec Discuss
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
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.
A. 3NF
B. Not 3NF
C. BCNF
D. Not 2NF
Your Answer: Correct Answer: A Not Attempted Time taken: 00min 02sec Discuss
Where, R1 = {A, D}; R2 = {A, B}; R3 = {B, E}; R4 = {C, D, E}; R5 = {A, E}
Your Answer: Correct Answer: A Not Attempted Time taken: 00min 01sec Discuss
B → C; A → B; A C → D
A B D → E ; A B → G ; B → F ; C → J ; C J → I ; G → H
A. 1 Only
B. 2 Only
C. Both
D. None.
Your Answer: Correct Answer: C Not Attempted Time taken: 00min 03sec Discuss
Incorrect
Attempts:
0 Resultant Marks: 0
0+0 0+0
Total Questions: 15
5 + 10
Total Marks: 25
5 + 20
Technical
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
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
“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
A. cust_id
B. loan_id
C. (cust_id, loan_id)
Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss
Your Answer: Correct Answer: 2 Not Attempted Time taken: 00min 00sec Discuss
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
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
Which of the following is/are correct rules in the context of functional dependencies over a database?
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
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
Your Answer: Correct Answer: B Not Attempted Time taken: 00min 01sec Discuss
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);
What tuples will R contain? (By the above command, all records in the table T will be deleted!)
Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss
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
Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss
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,
Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss
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
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).
A. d
B. d + 2
C. 2d
D. d 2
Your Answer: Correct Answer: D Not Attempted Time taken: 00min 00sec Discuss
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
Incorrect
Attempts:
0 Resultant Marks: 0
0+0 0+0
Total Questions: 15
5 + 10
Total Marks: 25
5 + 20
Technical
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
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
r(A, B, C)
s(A, B, C)
A. σ A>C (r ⋈ s)
B. σ A>C (r ∪ s)
D. σ A>C (r ∩ s)
Your Answer: Correct Answer: A;C;D Not Attempted Time taken: 00min 00sec Discuss
t1 ← σθ ((r × s) ÷ r)
t2 ← σθ ( s)
t 3 ← σ θ ( r)
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
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.
Your Answer: Correct Answer: D Not Attempted Time taken: 00min 00sec Discuss
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
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.
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
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.
Student Course
Robert Databases
Susie Databases
Course
Databases
Programming Languages
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
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.
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
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))
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
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
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
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);
A B
a a
b b
S
C A
b a
c a
T
D C
a b
c c
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
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}
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
Incorrect
Attempts:
0 Resultant Marks: 0
0+0 0+0
Total Questions: 15
5 + 10
Total Marks: 25
5 + 20
Technical
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
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
B
+
Tree is constructed by parameter n
Your Answer: Correct Answer: 999 Not Attempted Time taken: 00min 00sec Discuss
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”.
+
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
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
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
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
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
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
Your Answer: Correct Answer: 2076 Not Attempted Time taken: 00min 00sec Discuss
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
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
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
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
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
+
Your Answer: Correct Answer: 1 Not Attempted Time taken: 00min 00sec Discuss
Incorrect
Attempts:
2 Resultant Marks: 7.33
2+0 7.33 + 0
Total Questions: 10
10 + 0
Total Marks: 10
10 + 0
Technical
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
Your Answer: C Correct Answer: B Incorrect Time taken: 00min 29sec Discuss
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
A. Median
B. Count
C. Mode
D. Rank
Your Answer: A;C;D Correct Answer: A;C;D Correct Time taken: 00min 15sec Discuss
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
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
What will be the result of applying Equal-Width Binning by dividing the range into 3 bins?
Your Answer: A Correct Answer: A Correct Time taken: 00min 39sec Discuss
A. Nn
1
B.
n
N
C. N1
( ) n
D.
n !
N !
Your Answer: C Correct Answer: C Correct Time taken: 00min 03sec Discuss
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. 7
B. 8
C. 12
D. 14
Your Answer: 12 Correct Answer: C;12 Correct Time taken: 00min 03sec Discuss
Incorrect
Attempts:
3 Resultant Marks: 5
3+0 5+0
Total Questions: 10
10 + 0
Total Marks: 10
10 + 0
Technical
A. Composite keys
B. Determinants
C. Candidate keys
D. Foreign keys
Your Answer: C Correct Answer: C Correct Time taken: 00min 09sec Discuss
A. A
B. B
C. E
D. BC
Your Answer: B Correct Answer: B Correct Time taken: 00min 46sec Discuss
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
Your Answer: B Correct Answer: A Incorrect Time taken: 00min 37sec Discuss
Your Answer: C Correct Answer: B Incorrect Time taken: 00min 10sec Discuss
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
Your Answer: A Correct Answer: A Correct Time taken: 00min 14sec Discuss
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
Your Answer: A Correct Answer: A Correct Time taken: 00min 32sec Discuss
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
Incorrect
Attempts:
1 Resultant Marks: 11
0+1 5+6
Total Questions: 10
5+5
Total Marks: 15
5 + 10
Technical
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
B. Augmentation
C. Transitivity
D. Mutual dependency
Your Answer: D Correct Answer: D Correct Time taken: 01min 19sec Discuss
Your Answer: B Correct Answer: B Correct Time taken: 00min 39sec Discuss
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
B. Referential Integrity
C .Domain Integrity
Your Answer: B Correct Answer: B Correct Time taken: 00min 03sec Discuss
B. D1 × D2 × ⋯ × Dn
C. D1 ∪ D2 ∪ ⋯ ∪ Dn
D. D1 ∩ D2 ∩ ⋯ ∩ Dn
Your Answer: B Correct Answer: B Correct Time taken: 00min 07sec Discuss
{ 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
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
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 )
D. (X → Y and Y → Z ) implies X → Z
Your Answer: B;D Correct Answer: B;C;D Incorrect Time taken: 01min 20sec Discuss
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
Incorrect
Attempts:
0 Resultant Marks: 0
0+0 0+0
Total Questions: 15
5 + 10
Total Marks: 25
5 + 20
Technical
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?
Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss
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
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
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
{A, B} → C, D, E, F
E→D
C→F
Which of the following options are true? (Select all correct choices)
Your Answer: Correct Answer: B;C;D Not Attempted Time taken: 00min 00sec Discuss
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
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
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
Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss
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
Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss
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
Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss
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
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.
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??
Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss
Incorrect
Attempts:
0 Resultant Marks: 0
0+0 0+0
Total Questions: 15
5 + 10
Total Marks: 25
5 + 20
Technical
Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss
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
Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss
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
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
Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss
A. Closure Dependency
B. Transitive Dependency
C. Normal Dependency
D. Functional Dependency
Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss
Armstrong (1974) proposed systematic approach to derive functional dependencies. Match the following
w.r.t functional dependencies:
Codes:
Your Answer: Correct Answer: D Not Attempted Time taken: 00min 00sec Discuss
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
Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss
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
A. ABCD, ϕ
B. ABCD, E
C. Φ, ϕ
D. ABC , E
Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss
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
Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss
Book (Title, Author, Catalog_no, Publisher, Year, Price) Collection(Title, Author, Catalog_no) with the following
functional dependencies :
III. Publisher, Title, Year → Price Assume (Author, Title) is the key for both schemas. Which one of the
following is true ?
Your Answer: Correct Answer: C Not Attempted Time taken: 00min 02sec Discuss
Incorrect
Attempts:
0 Resultant Marks: 0
0+0 0+0
Total Questions: 10
5+5
Total Marks: 15
5 + 10
Technical
Your Answer: Correct Answer: B Not Attempted Time taken: 00min 00sec Discuss
A relational scheme is in..... if it is in 1NF and if all non prime attributes are fully functionally dependent on the
relation key
Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss
Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss
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
Your Answer: Correct Answer: B Not Attempted Time taken: 00min 02sec Discuss
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
Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss
Consider a relational table R that is in 3NF , but not in BCNF. Which one of the following statements is
TRUE?
Your Answer: Correct Answer: A Not Attempted Time taken: 00min 00sec Discuss
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
Your Answer: Correct Answer: 7 Not Attempted Time taken: 00min 00sec Discuss
Incorrect
Attempts:
5 Resultant Marks: 1.67
2+3 1.67 + 0
Total Questions: 10
5+5
Total Marks: 15
5 + 10
Technical
Your Answer: A Correct Answer: A Correct Time taken: 00min 11sec Discuss
Your Answer: A;D Correct Answer: A;C;D Incorrect Time taken: 02min 06sec Discuss
Your Answer: C Correct Answer: D Incorrect Time taken: 00min 51sec Discuss
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 >}
SQ1 :
EXCEPT
SQ2 :
EXCEPT ALL
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
Consider the following three SQL queries (Assume the data in the people table):
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
select distinct w, x
from r, s
Your Answer: D Correct Answer: A Incorrect Time taken: 01min 40sec Discuss
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?
A. 127
B. 255
C. 129
D. 257
Your Answer: Correct Answer: A Not Attempted Time taken: 00min 06sec Discuss
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
Consider the set of relations shown below and the SQL query that follows.
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
Your Answer: A Correct Answer: C Incorrect Time taken: 01min 29sec Discuss
Incorrect
Attempts:
0 Resultant Marks: 0
0+0 0+0
Total Questions: 10
5+5
Total Marks: 15
5 + 10
Technical
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:
How many rows and columns will be retrieved by the following SQL statement?
Your Answer: Correct Answer: D Not Attempted Time taken: 00min 00sec Discuss
Q #2 Numerical Type Award: 1 Penalty: 0 Databases
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
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
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:
Your Answer: Correct Answer: 5 Not Attempted Time taken: 00min 00sec Discuss
Passenger
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
Suppose we have a relation R(A, B) with one tuple, both of whose components are NULL:
A. (NULL,NULL)
B. (NULL,0)
C. (NULL, 1)
D. Empty Table
Your Answer: Correct Answer: Not Attempted Time taken: 00min 00sec Discuss
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
SELECT *
FROM Student
WHERE gender = 'F' AND
marks > 65;
Your Answer: Correct Answer: 2 Not Attempted Time taken: 00min 00sec Discuss
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
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
Select deptName
From Employee
Where sex = ‘M’
Group by deptName
5. Having avg(salary) >
(select avg (salary) from Employee)
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
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
Incorrect
Attempts:
1 Resultant Marks: 6.67
1+0 2.67 + 4
Total Questions: 10
5+5
Total Marks: 15
5 + 10
Technical
A. (1, 2)
B. (5, 3)
C. (8, 6)
D. (6, 4)
Your Answer: B Correct Answer: B Correct Time taken: 01min 36sec Discuss
Given the following table Scores(Team, Opponent, RunsFor, RunsAgainst) and query.
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
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
A. (1, 0)
B. (2, 0)
C. (2, NULL)
D. (0, 0)
Your Answer: C Correct Answer: B Incorrect Time taken: 00min 42sec Discuss
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
Your Answer: A;D Correct Answer: A;D Correct Time taken: 04min 07sec Discuss
Your Answer: Correct Answer: 16 Not Attempted Time taken: 01min 42sec Discuss
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
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
Compute the result of the following query on the above table Arc(x, y):
Your Answer: Correct Answer: 6 Not Attempted Time taken: 13min 07sec Discuss
Incorrect
Attempts:
0 Resultant Marks: 0
0+0 0+0
Total Questions: 10
5+5
Total Marks: 15
5 + 10
Technical
Your Answer: Correct Answer: 48 Not Attempted Time taken: 00min 00sec Discuss
Your Answer: Correct Answer: 28 Not Attempted Time taken: 00min 02sec Discuss
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
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
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
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}.
Your Answer: Correct Answer: A;B;C Not Attempted Time taken: 00min 00sec Discuss
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
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
Incorrect
Attempts:
0 Resultant Marks: 0
0+0 0+0
Total Questions: 10
5+5
Total Marks: 15
5 + 10
Technical
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
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
S
A C
10 90
30 45
40 80
σB < C ( R ⋈ R. A = S . A S) is ___________.
Your Answer: Correct Answer: 2 Not Attempted Time taken: 00min 00sec Discuss
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
π π σ σ 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
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
The following relation records the age of 500 employees of a company, where empNo (indicating the
employee number) is the key:
empAge(empNo
––––––––
, age)
Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss
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?
Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss
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
Customers = C (CName)
Shops = S (SName)
C−Π CName (( C × S ) − B)
returns the names of
Your Answer: Correct Answer: C Not Attempted Time taken: 00min 00sec Discuss
Incorrect
Attempts:
2 Resultant Marks: 7.33
0+2 4 + 3.33
Total Questions: 10
5+5
Total Marks: 15
5 + 10
Technical
Using relational Algebra, the Query that finds customers who have balance more than 10,000 is _____
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
Which of the following queries cannot be expressed using the basic relational algebra operations
(σ, π, ×, ⋈, ∪, ∩, −)?
Your Answer: C Correct Answer: C Correct Time taken: 01min 32sec Discuss
A. Project
B. Join
C. Extract
D. Substitute
Your Answer: A Correct Answer: A Correct Time taken: 00min 15sec Discuss
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 .
Your Answer: Correct Answer: D Not Attempted Time taken: 00min 45sec Discuss
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
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
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
Your Answer: C Correct Answer: C Correct Time taken: 00min 28sec Discuss
Which of the following relational operations will produce the following tuple only?
Your Answer: B Correct Answer: C Incorrect Time taken: 01min 25sec Discuss