GATE Questions
GATE Questions
html
https://www.geeksforgeeks.org/dbms-gq/database-design-normal-forms-gq/
GATE-1998
1. Which normal form is considered adequate for normal relational database design?
(a) 2NF (b) 5NF (c) 4NF (d) 3NF
GATE-2001
2. Consider a schema R(A, B, C, D) and functional dependencies A -> B and C -> D. Then the
decomposition of R into R1 (A, B) and R2(C, D) is
(a) dependency preserving and lossless join
(b) lossless join but not dependency preserving
(c) dependency preserving but not lossless join
(d) not dependency preserving and not lossless join
ii) Lossless-Join Property:
The decomposition is a lossless-join decomposition of R if at least one of the following functional
dependencies are in F+:-
a) R1 ∩ R2 -> R1
b) R1 ∩ R2 -> R2
It ensures that the attributes involved in the natural join ( ) are a candidate key for at least one of the two
relations.In the above question schema R is decomposed into R1 (A, B) and R2(C, D), and R1 ∩ R2 is
empty. So, the decomposition is not lossless.
GATE-2002
3. Relation R with an associated set of functional dependencies, F, is decomposed into BCNF. The
redundancy (arising out of functional dependencies) in the resulting set of relations is
(a) Zero
(b) More than zero but less than that of an equivalent 3NF decomposition
(c) Proportional to the size of F+
(d) Indeterminate
A relation schema R is in Boyce-Codd Normal Form (BCNF) with respect to a set F of functional
dependencies if for all functional dependencies in F+ of the form α→β, where α⊆R and β⊆R,at
least one of the following holds:
α→β is a trivial functional dependency (i.e. β⊆α).
α is a superkey for schema R.
GATE-2005
4. 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
GATE-2005 (IT)
5. A table has fields F1, F2, F3, F4, and F5, with the following functional dependencies:
F1->F3
F2->F4
(F1,F2)->F5
in terms of normalization, this table is in
(a) 1NF (b) 2NF (c) 3NF (d) None of these
GATE-2012
6. Which of the following is TRUE?
(a) Every relation in 2NF is also in BCNF
(b) A relation R is in 3NF if every non-prime attribute of R is fully functionally dependent on every key of
R
(c) Every relation in BCNF is also in 3NF
(d) No relation can be in both BCNF and 3NF
GATE-2004
8. The relation schema Student_Performance (name, courseNo, rollNo, grade) has the following FDs:
name,courseNo->grade
rollNo,courseNo->grade
name->rollNo
rollNo->name
The highest normal form of this relation scheme is
(a) 2NF (b) 3NF (c) BCNF (d)4NF
A table is in 3NF if and only if, for each of its functional dependencies X -> A, at least one of the
following conditions holds:
* X contains A (that is, X -> A is trivial functional dependency), or
* X is a superkey, or
* A should be prime attribute.
Note the definition of BCNF in question number 3. None of FDs satisfy first condition. That
means for this relation to be in BCNF all FDs must satisfy the second condition, that is left side of
all FDs should be a superkey. But below 2 FDs satisfy the second condition.
name->rollNo , name is not a superkey
rollNo->name, roll is not a superkey
Hence not BCNF. Therefore the highest normal form of this relation scheme is 3NF.
GATE-2004 (IT)
9. The relation EMPDT1 is defined with attributes empcode(unique), name, street, city, state, and pincode.
For any pincode,there is only one city and state. Also, for any given street, city and state, there is just one
pincode. In normalization terms EMPDT1 is a relation in
(a) 1NF only
(b) 2NF and hence also in 1NF
(c) 3NF and hence also in 2NF and 1NF
(d) BCNF and hence also in 3NF, 2NF and 1NF
GATE-2007
10. Which one of the following statements if FALSE?
(a) Any relation with two attributes is in BCNF
(b) A relation in which every key has only one attribute is in 2NF
(c) A prime attribute can be transitively dependent on a key in a 3 NF relation.
(d) A prime attribute can be transitively dependent on a key in a BCNF relation.
GATE-2008
11. Consider the following relational schemes 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 schemes. Which of the following statements is true?
(a) Both Book and Collection are in BCNF
(b) Both Book and Collection are in 3NF only
(c) Book is in 2NF and Collection is in 3NF
(d) Both Book and Collection are in 2NF only
GATE-2008(IT)
12. Let R(A,B,C,D,E,P,G) be a relational schema in which the following FDs are known to hold:
AB->CD
DE->P
C->E
P->C
B->G
The relation schema R is
(a) in BCNF (b) in 3NF, but not in BCNF
(c) in 2NF, but not in 3NF (d) not in 2NF
GATE-2013
Consider F->G; G is a non-prime attribute and F is a proper subset of a candidate key (refer the above
question). This is a case of partial dependency. Hence 2NF condition is violated. similarly A->C and B-
>CH also violates 2NF condition, hence R is not in 2NF.
The process to properly define the database tables to provide flexibility, minimized
redundancy and data integrity is called ______
Options:
1. Design rationalization
2. Class diagram
3. Data normalization
4. Database design
Solution:
Normalization is used for Eliminating redundant(useless) data and Ensuring data dependencies.
It should only have a single value for attribute and values stored in it should be of the same
domain
All the columns in a table should have unique names.
The primary key is (VOLUME, NUMBER, STARTPAGE, ENDPAGE) and the following functional
dependencies exist in the schema.
Which is the weakest normal form that the new database satisfies, but the old one does not?
Options:
1. 1NF
2. 2NF
3. 3NF
4. BCNF
Solution:
1st satisfy
2nd satisfy
Weakest normal form that new database satisfies but old one doesn’t is 2NF.
Question 3: Download PDF ››
Options:
1. Both I and II
2. I only
3. II only
4. Neither I nor II
Solution:
X = (PQRS)
F = {QR → S, R → P, S → Q}
QR → {Q, R, S, P}
SR → {S, R, P, Q}
It is partial dependency and hence not in 2nd normal form and therefore not in BCNF (Given)
For Y = (PR)
R→P
For Z = (QRS)
QR → S
S→Q
SR → {R, S, Q}
QR → {R, Q, S}
∴ statement I is incorrect
Dependency Preserving:
R → P is in Y
QR → S in Z
S → Q is in Z
Lossless:
Y ∩ Z = R which is key of Y.
Therefore, it is Lossless
Statement II is correct.
Consider a relational table R that is in 3NF, but not in BCNF, Which one of the following
statements is TRUE?
Options:
Solution:
Concept:
A relation R with nontrivial functional dependency X → A, where X is not a superkey and A is a prime
attribute, is called to be in 3NF.
Explanation:
Statement I:
corresponds to a relation that is in 3NF but not in BCNF, because for BCNF, X must be a superkey.
Statement II
Statement III
If every non-key attribute functionally dependant on the primary key, then the relation will be in
Options:
Concept –
In the given question, it is not mentioned that the functional dependency of non-attribute is partial or
full. In 2NF, both types of dependencies are allowed.
However, partial dependency is strictly prohibited in 3NF. Hence, 2NF will be highest Normal Form
assumed by the given statement.
Example:
Consider the following four relational schemas. For each schema, all non-trivial functional
dependencies are listed. The underlined attributes are the respective primary keys.
Schema I:
Field ‘courses’ is a set-valued attribute containing the set of courses a student has
registered for.
rollno → courses
Schema II:
rollno, courseid → email
email → rollno
Schema III:
marks → grade
Schema IV:
rollno, courseid → credit
courseid → credit
Which one of the relational schemas above is in 3NF but not in BCNF?
Options:
1. Schema I
2. Schema II
3. Schema III
4. Schema IV
Solution:
Schema I
Field ‘courses’ is a set-valued attribute containing the set of courses a student has registered for.
Non-trivial functional dependency
rollno → courses
Since rollno is the primary key, so this relation is in BCNF as well as 3 NF.
Schema II
Non-trivial functional dependencies:
rollno, courseid → email
email → rollno
Since, {rollno, coursid} is the primary key so rollno and courseid are prime attributes. email is a non-
prime attribute.
Functional dependency (FD) rollno, courseid → email is in BCNF and 3NF, but FD email →
rollno violates the rule of BCNF because email is not superkey.
Schema III
Non-trivial functional dependencies:
rollno, courseid, → marks, grade
marks → grade
Since rollno, courseid is the primary key, so rollno and courseid are prime attributes, and marks and
grade are non-prime attributes.
FD rollno, courseid, → marks, grade satisfies BCNF as well as 3 NF.
FD marks → grade does not satisfy 3 NF because neither marks are superkey nor grade is prime-
attribute. So, also can not be in BCNF.
So, overall this relation is not in 3 NF and not in BCNF but it does not violate the rule of 2 NF, so can
be only in 2 NF.
Schema IV
Non-trivial functional dependencies:
rollno, courseid → credit
courseid → credit
Since, rollno, courseid is the primary key, so rollno and courseid are prime-attributes and credit is a
non-prime attribute.
FD rollno, courseid → credit satisfies BCNF as well as 3 NF.
FD courseid → credit violates the rule of 2 NF, so can not be in 2NF.
So, overall this is not in 2 NF, 3 NF, and BCNF. But it is only in 1 NF.
A relation in which every non-key attribute is fully functionally dependent on the primary key
and which has no transitive dependencies, is said to be in _____
Options:
1. BCNF
2. 1NF
3. 2NF
4. 3 NF
Solution:
1NF:
2NF:
3NF
The third normal form is based on the concept of transitive dependency. A functional
dependency X->Y in a relation schema R is a transitive dependency if there exists a set of
attributed Z in R that is neither a candidate key nor a subset of any key of R.
A relation is in 3NF if it satisfies 2NF and no prime attribute of R is transitively dependent on
the primary key.
If X - > A is a functional dependency, then A should be a prime attribute or X should be a
candidate key.
Lossless join and dependency preservation is always possible in 3NF. 3NF decomposition is
always lossless join and dependency preserving.
BCNF:
Given a relation schema R(ABCDEFGH) in first normal form. For the set of dependencies
Options:
1. AC → H
2. C → H
3. G → H
4. A → H
Solution:
Concept:
If A → B and B → C then A → C is logically implied to A → B and B → C FDs this is nothing but
transitivity rule.
Explanation:
A→B
B→H
Then we can say that A->H which is logically implied by above both FDs
S1: Every table with two single-valued attributes is in 1NF, 2NF, 3NF and BCNF.
Options:
Solution:
Statement 1: TRUE
BCNF (Boyce Codd Normal Form):
Example:
Consider R(A, B), in this only one functional dependency is possible either A → B or B → A
In both the cases, left hand side will be the super key. In this way R(A, B) is always in BCNF.
Statement 2: FALSE
Set 1 = {AB → C, D → E, AB → E, E→ C}
Set 2 = {AB → C, D → E, E → C}
The two sets of functional dependencies are not the same and hence one cannot be minimal of other.
A relation is in _______ form if every field contains only atomic values, that is, not lists or sets.
Options:
1. Second normal
2. Third normal
3. Fourth normal
4. First normal
Solution:
First Normal Form (1 NF) – All the values of attributes should be atomic
Second Normal Form (2 NF) – (Non-key -> Non-key) derivation not allowed
Third Normal Form (3 NF)– (Proper Subset of candidate key -> Non-key) not allowed
Therefore, a relation is in first form if every field contains only atomic values, that is, not lists or sets
Options:
Solution:
CONCEPT
Third Normal form: A relation is said to be in third normal form if it is in 2NF & there must not exist
any transition dependency.
2. B should be a part of a key attribute or prime attribute i.e. B should be a part of a candidate key.
BCNF: A relation is said to be in Boyce-Codd normal form (BCNF) if it is in 3NF & must satisfy this
property:
EXPLANATION:
Option 1: FALSE
Option 2: FALSE
A relation R is in 3NF if every non-prime attribute of R is fully functionally dependent on every key of R
but this does not guarantee transitive dependency.
Option 3: TRUE
Option 4: FALSE
Any relation can be in both BCNF & 3NF if it satisfies the condition of BCNF.
Options:
Answer: Option 3
CONCEPT:
3NF:
BCNF:
EXPLANATION:
AB → CDE
C → B
(AB)+ = {A, B, C, D, E}
(AC)+ = {A, C, B, D, E}
Keys: AB and AC
Since AB and AC are the keys; but in the second functional dependency, C is not key.
1NF
A relation is in 2NF if it has No Partial Dependency i.e., no non-prime attribute (attributes which are
not part of any candidate key) is dependent on any proper subset of any candidate key of the table
Every time the attribute A appears, it is matched with the same value of attribute B but not the
same value of attribute C. Which of the following is true ?
Options:
1. A -> (B, C)
2. A -> B, A ->> C
3. A -> B, C ->> A
4. A ->> B, B -> C
Solution:
Answer: Option 2
Concept:
Multivalued dependency:
A B C
A1 B1 C1
A1 B1 C2
A2 B2 C1
A2 B2 C2
A3 B3 C1
A3 B3 C2
A4 B3 C1
A4 B3 C2
In this Table, A -> B exists, and also A->>C also exists since for each value of A attribute we have a
tuple for all possible C values. Hence A->> C holds.
Consider R is a relation;
2. Trivial MVD:
Explanation:
Question says that whenever attribute A appears, it is matched with the same value of attribute B but
not the same value of attribute C.
Hence This is exactly the same case in the above table hence A->B holds and A->>C holds.
In Option '3', C->>A can not be true because for each A value B is matched but C is not matched it
does not say anything about the C values.
Question 14: Download PDF ››
Consider the schema R (A, B, C, D) and the functional dependencies A → B and C → D. If the
decomposition is made as R1 (A, B) and R2 (C, D), then which of the following is TRUE ?
Options:
Solution:
R: Fl
R1 (A, B) : (F1) R2 (C, D) : (F2)
A→B C→D
A→ A C→C
B→B D→D
Decomposition R into R1 and R2 is said to lossless if and only if the attribute common must be a key in
either R1 or R2 or Both otherwise it lossy Decomposition or not lossless join.
The schema R (A, B, C, D) key is AC. R1 (A, B) and R2 (C, D) common attribute is empty so It not a
key in R1 or R2 or Both relation. Hence It is not lossless join decomposition.
∴ Hence the correct answer is Preserves dependency but cannot perform the lossless join.
A → B
B → C
C → D
D → B
Options:
Solution:
CONCEPT:
That means, after natural join R1 & R2, we will get exactly the same relation R.
1. R1 ∩ R2 = R1 or R1 ∩ R2 = R2
2. R1 U R2 = R
Closure of Union of all functional dependencies with respect to each relation is equivalent to closure
of F.
EXPLANATION:
R1 ∩ R2 -> (B)+ -> { B,C,D } {B is common attribute in both relation so find its closure}
R1' ∩ R3 -> (B)+ -> { B,C,D } {B is common attribute in both relation so find its closure}
Since B+ derives relation R3, Hence relation R(A,B,C,D) is lossless.
Decomposition:
Here,
= { A->B, B->C, D->B }
Answer: (C)
Answer: (B)
Answer: (A)
Answer: (A)
Answer: (C)
R(A,B,C,D) is a relation. Which of the following does not have a lossless join,
dependency preserving BCNF decomposition?
(A) A->B, B->CD
(B) A->B, B->C, C->D
(C) AB->C, C->AD
(D) A ->BCD
Answer: (C)
Consider the schema R= ( S, T, U, V ) and the dependencies S→T, T→U,
U→V and V→S. Let R (R1 and R2) be a decomposition such that
R1∩R2 ≠ Ø. The decomposition is:
(A) Not in 2NF
(B) In 2NF but not in 3NF
(C) In 3NF but not in 2NF
(D) In both 2NF and 3NF
Answer: (D)
A table has fields Fl, F2, F3, F4, F5 with the following functional
dependencies
F1 → F3 F2→ F4 (F1 . F2) → F5
In terms of Normalization, this table is in
(A) 1 NF
(B) 2 NF
(C) 3 NF
(D) none
Answer: (A)
Answer: (D)
Question 1
WRONG
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?
3
4
C5
D6
Database Design(Normal Forms)
Discuss it
Question 1 Explanation:
A+ is ABCEFGH which is all attributes except D. B+ is also ABCEFGH which is all
attributes except D. E+ is also ABCEFGH which is all attributes except D. F+ is also
ABCEFGH which is all attributes except D. So there are total 4 candidate keys AD,
BD, ED and FD
Question 2
WRONG
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?
3
4
C5
D6
Database Design(Normal Forms)
Discuss it
Question 2 Explanation:
A+ is ABCEFGH which is all attributes except D. B+ is also ABCEFGH which is all
attributes except D. E+ is also ABCEFGH which is all attributes except D. F+ is also
ABCEFGH which is all attributes except D. So there are total 4 candidate keys AD,
BD, ED and FD
Question 3
CORRECT
Consider the FDs given in above question. The relation R is
in 1NF, but not in 2NF.
Question 3 Explanation:
The table is not in 2nd Normal Form as the non-prime attributes are dependent on
subsets of candidate keys. The candidate keys are AD, BD, ED and FD. In all of the
following FDs, the non-prime attributes are dependent on a partial candidate key. A
-> BC B -> CFH F -> EG
Question 4
WRONG
Which of the following is TRUE?
Every relation in 3NF is also in BCNF
A relation R is in 3NF if every non-prime
Question 4 Explanation:
BCNF is a stronger version 3NF. So every relation in BCNF will also be in 3NF.
Question 5
CORRECT
Consider a relational table with a single record for each registered student with the
following attributes.
1. Registration_Num: Unique registration number
of each registered student
2. UID: Unique identity number, unique at the
national level for each citizen
3. BankAccount_Num: Unique account number at
the bank. A student can have multiple accounts
or join accounts. This attribute stores the
primary account number.
4. Name: Name of the student
5. Hostel_Room: Room number of the hostel
Which one of the following option is INCORRECT?
BankAccount_Num is candidate key
Question 5 Explanation:
A Candidate Key value must uniquely identify the corresponding row in table.
BankAccount_Number is not a candidate key. As per the question “A student can
have multiple accounts or joint accounts. This attributes stores the primary account
number”. If two students have a joint account and if the joint account is their primary
account, then BankAccount_Number value cannot uniquely identify a row.
Question 6
CORRECT
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)
Assume that, in the suppliers relation above, each supplier and each street within a
city has a unique name, and (sname, city) forms a candidate key. No other functional
dependencies are implied other than those implied by primary and candidate keys.
Which one of the following is TRUE about the above schema?
The schema is in BCNF
Question 6 Explanation:
A relation is in BCNF if for every one of its dependencies X → Y, at least one of the
following conditions hold:
X → Y is a trivial functional dependency (Y ⊆ X)
X is a superkey for schema R
Since (sname, city) forms a candidate key, there is no non-tirvial dependency X → Y
where X is not a superkey
Question 7
WRONG
Consider the following relational schemes for a library database: Book (Title, Author,
Catalog_no, Publisher, Year, Price) Collection (Title, Author, Catalog_no) with in 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 schemes. Which of the following
statements is true?
Both Book and Collection are in BCNF
Question 7 Explanation:
Book (Title, Author, Catalog_no, Publisher, Year, Price)
Collection (Title, Author, Catalog_no)
with in the following functional dependencies:
I. Title, Author --> Catalog_no
II. Catalog_no --> Title, Author, Publisher, Year
III. Publisher, Title, Year --> Price
WRONG
Consider the relation scheme R = {E, F, G, H, I, J, K, L, M, M} and the set of
functional dependencies {{E, F} -> {G}, {F} -> {I, J}, {E, H} -> {K, L}, K -> {M}, L -> {N}
on R. What is the key for R?
{E, F}
{E, F, H}
C {E, F, H, K, L}
D {E}
Database Design(Normal Forms) GATE-CS-2014-(Set-1)
Discuss it
Question 8 Explanation:
All attributes can be derived from {E, F, H} To solve these kind of questions that are
frequently asked in GATE paper, try to solve it by using shortcuts so that enough
amount of time can be saved. Fist Method: Using the given options try to obtain
closure of each options. The solution is the one that contains R and also minimal
Super Key, i.e Candidate Key.
D) {E}+ = {E} ≠ R
Second Method:
Since, {EFGHIJKLMN}+ = {EFGHIJKLMN}
{EFGHIJKL}+ = {EFGHIJKLMN}
Again {EFGHIJ}+ = {EFGHIJKLMN} (Since {E, H} -> {K, L}, hence replace
KL by EH)
CORRECT
Given the following two statements:
S1: Every table with two single-valued
attributes is in 1NF, 2NF, 3NF and BCNF.
Question 9 Explanation:
WRONG
The maximum number of superkeys for the relation schema R(E,F,G,H) with E as
the key is
5
B6
C7
8
Database Design(Normal Forms) GATE-CS-2014-(Set-2)
Discuss it
Question 10 Explanation:
Maximum no. of possible superkeys for a table with n attributes = 2^(n-1) Here, n =
4. So, the possible superkeys = 24-1 = 8 The possible superkeys are : E, EH, EG, EF,
EGH, EFH, EFG, EFGH
Question 11
WRONG
Which one of the following statements about normal forms is FALSE?
BCNF is stricter than 3NF
Lossless, dependency-preserving decomposi-
B tion into 3NF is always possible
Lossless, dependency-preserving decomposi-
Question 11 Explanation:
See question 1 of http://www.geeksforgeeks.org/database-management-systems-
set-8/
Question 12
WRONG
Let r be a relation instance with schema R = (A, B, C, D). We define r 1 = ΠA, B, C (r) and
r2 = ΠA.D (r). Let s = r1 * r2 where * denotes natural join. Given that the decomposition
of r into r1 and r2 is lossy, which one of the following is TRUE?
s⊂r
B r∪s
r⊂s
D r*s=s
Database Design(Normal Forms) GATE-CS-2005
Discuss it
Question 12 Explanation:
See Question 1 of http://www.geeksforgeeks.org/database-management-systems-
set-10/
Question 13
WRONG
Consider a relation scheme R = (A, B, C, D, E, H) on which the following functional
dependencies hold: {A–>B, BC–>D, E–>C, D–>A}. What are the candidate keys of
R?
AE, BE
B AE, BE, DE
C AEH, BEH, BCH
AEH, BEH, DEH
Database Design(Normal Forms) GATE-CS-2005
Discuss it
Question 13 Explanation:
See question 3 of http://www.geeksforgeeks.org/database-management-systems-
set-10/
Question 14
WRONG
Let R1 (A, B, C) and R2 (D, E) be two relation schema, where the primary keys are
shown underlined, and let C be a foreign key in R1 referring to R2. Suppose there is
no violation of the above referential integrity constraint in the corresponding relation
instances r1 and r2. Which one of the following relational algebra expressions would
C3
D4
Database Design(Normal Forms) GATE-CS-2004
Discuss it
Question 14 Explanation:
Since C is a foreign key in R1 and there is no violation of the above referential
integrity constraint, the set of values in C must be a subset of values in R2.
Question 15
WRONG
The relation scheme Student Performance (name, courseNo, rollNo, grade) has the
following functional dependencies:
name, courseNo → grade
rollNo, courseNo → grade
name → rollNo
rollNo → name
The highest normal form of this relation scheme is
2 NF
3 NF
C BCNF
D 4NF
Database Design(Normal Forms) GATE-CS-2004
Discuss it
Question 15 Explanation:
For easy understanding let's say attributes (name, courseNo, rollNo, grade) be
(A,B,C,D). Then given FDs are as follows:
AB->D, CB->D, A->C, C->A
Here there are two Candidate keys, AB and CB. Now AB->D and CB->D satisfy
BCNF as LHS is superkey in both. But, A->C and C->A, doesn't satisfy BCNF.
Hence we check for 3NF for these 2 FDs. As C and A on RHS of both the FDs are
prime attributes, they satisfy 3NF. Hence for the whole relation the highest normal
form is 3NF.
Question 16
WRONG
Consider the relation Student (name, sex, marks), where the primary key is shown
underlined, pertaining to students in a class that has at least one boy and one girl.
What does the following relational algebra expression produce? (Note: r is the
rename
operator). Th
e condition in join is "(sex = female ^ x = male ^ marks ≤ m)"
names of girl students with the highest marks
names of girl students with more marks than
B some boy student
names of girl students with marks not less
C than some boy students4)
names of girl students with more marks than
Question 16 Explanation:
The above relational algebra expression has two sub expressions.
The first one takes as input the Student relation (Student) and filters
out all the tuples where sex=female(r sex=female (Student))
and then projects their names (P name r sex=female (Student)).
So we get a new relation with names of all the female students.
The second one takes as input the Student relation and performs a
rename
operation on one with attributes name, sex and marks renamed as n, x, m
respectively (r n, x, m(Student)) and then followed by a self-Cartesian
product on the Student relation. The condition (sex = female ^ m =
male ^ marks ≤ m)
filters tuples with all female students from the first relation,
male students from the second relation and performs a Cartesian product
where
marks of the female student is either less than or equal to a male
student and
then projects their names. So we get a new relation with names of all
female
students whose marks are lesser than at least one of the male student.
The difference operator(-) between the two subexpressions gives the names of all
female students whose marks are more than all male students of the class. (From all
the female students’ names we remove all those whose marks are at least more the
one male student) This explanation has been contributed by Yashika Arora.
Question 17
WRONG
Consider the following functional dependencies in a database:
Data_of_Birth → Age
Age → Eligibility
Name → Roll_number
Roll_number → Name
Course_number → Course_name
Course_number → Instructor
(Roll_number, Course_number) → Grade
The relation (Roll_number, Name, Date_of_birth, Age) is:
In second normal form but not in third normal
form
Question 17 Explanation:
The given table is not in 2NF as age is dependent on date of birth.
Question 18
WRONG
Relation R with an associated set of functional dependencies, F is decomposed into
BCNF. The redundancy (arising out of functional dependencies) in the resulting set
relations is.
Zero
More than zero but less than that of an
Question 18 Explanation:
If a relational schema is in BCNF then all redundancy based on functional
dependency has been removed, although other types of redundancy may still exist.
Source: http://en.wikipedia.org/wiki/Boyce%E2%80%93Codd_normal_form
Question 19
WRONG
With regard to the expressive power of the formal relational query languages, which
of the following statements is true?
Relational algebra is more powerful than
relational calculus
Relational algebra has the same power as
B relational calculus
Relational algebra has the same power as safe
relational calculus
Question 19 Explanation:
WRONG
Relation R is decomposed using a set of functional dependencies, F and relation S is
decomposed using another set of functional dependencies G. One decomposition is
definitely BCNF, the other is definitely 3NF, but it is not known which is which. To
make a guaranteed identification, which one of the following tests should be used on
the decompositions? (Assume that the closures of F and G are available).
Dependency-preservation
B Lossless-join
BCNF definition
D 3NF definition
Database Design(Normal Forms) GATE-CS-2002
Discuss it
Question 20 Explanation:
Answer is (C) since to identify BCNF we need BCNF definition. One relation which
satisfies will be in BCNF and other will be in 3NF. 1st is wrong because dependency
may be preserved by both 3NF and BCNF. 2nd is wrong Because both 3NF and
BCNF decomposition can be lossless. 4th is wrong because 3NF and BCNF both
are in 3NF also.
Question 21
WRONG
From the following instance of a relation scheme R (A, B, C), we can conclude that :
A B C
1 1 1
1 1 0
2 3 2
2 3 2
A functionally determines B and
B functionally determines C
A functionally determines B and
determine C
B does not functionally
determine C
A does not functionally
D
determine B and B does not
functionally determine C
Database Design(Normal Forms) GATE-CS-2002
Discuss it
Question 21 Explanation:
Generally Normalization is done on the schema itself. From the relational instance
given,we may strike out FD s that do not hold. e.g.B does not functionally determine
C(This is true). But we cannot say that A functionally determines B for the entire
relation itself. This is because that, A->B holds for this instance, but in future there
might be some tuples added to the instance that may violate A->B. So overall on the
relation we cannot conclude that A->B, from the relational instance which is just a
subset of an entire relation. Refer http://geeksquiz.com/database-normalization-
introduction/ for more details.
Question 22
WRONG
Consider a schema R(A,B,C,D) and functional dependencies A->B and C->D. Then
the decomposition of R into R1(AB) and R2(CD) is
dependency preserving and lossless join
Question 22 Explanation:
Dependency Preserving Decomposition:
Decomposition of R into R1 and R2 is a dependency preserving decomposition if
closure of functional dependencies after decomposition is same as closure of of FDs
before decomposition.
A simple way is to just check whether we can derive all the original FDs from the
FDs present after decomposition.
In the above question R(A, B, C, D) is decomposed into R1 (A, B) and R2(C, D) and there are
only two FDs A -> B and C -> D. So, the decomposition is dependency preserving
Lossless-Join Decomposition:
Decomposition of R into R1 and R2 is a lossless-join decomposition if at least one of the
following functional dependencies are in F+ (Closure of functional dependencies)
R1 ∩ R2 → R1
OR
R1 ∩ R2 → R2
In the above question R(A, B, C, D) is decomposed into R1 (A, B) and R2(C, D), and R1 ∩ R2
is empty. So, the decomposition is not lossless.
Question 23
WRONG
Suppose the adjacency relation of vertices in a graph is represented in a table
Adj(X,Y). Which of the following queries cannot be expressed by a relational algebra
expression of constant length?
List of all vertices adjacent to a given vertex
Question 23 Explanation:
(A) This is simple query as we need to find (X, Y) for a given X. (B) This is also
simple as need to find (X, X) (C) :-> Cycle < 3 . Means cycle of length 1 & 2. Cycle of
length 1 is easy., Same as self loop. Cycle of length 2 is is also not too hard to
compute. Though it'll be little complex, will need to do like (X,Y) & (Y, X ) both
present & X != Y,. We can do this with constant RA query. (D) :-> This is most hard
part. Here we need to find closure of vertices. This will need kind of loop. If the graph
is like skewed tree, our query must loop for O(N) Times. We can't do with constant
length query here. Answer is :-> D
Question 24
WRONG
Let r and s be two relations over the relation schemes R and S respectively, and let
BB
C
DD
Database Design(Normal Forms) GATE-CS-2001
Discuss it
Question 24 Explanation:
The above expression evaluates A = a for tables r and s Option A : is only
displaying attributes of table r on the select condition Option B : is only displaying
attributes of table r Option C: evaluates A = a by joining tables r and s efficiently ,
thus correct Therefore, Answer C
Question 25
WRONG
R(A,B,C,D) is a relation. Which of the following does not have a lossless join,
dependency preserving BCNF decomposition?
A->B, B->CD
D A ->BCD
Database Design(Normal Forms) GATE-CS-2001
Discuss it
Question 25 Explanation:
Background :
Lossless-Join Decomposition:
Decomposition of R into R1 and R2 is a lossless-join decomposition if at
least one of the following functional dependencies are in F+ (Closure of
functional dependencies)
R1 ∩ R2 → R1
OR
R1 ∩ R2 → R2
dependency preserving :
Decomposition of R into R1 and R2 is a dependency preserving
decomposition if closure of functional dependencies after decomposition
is same as closure of of FDs before decomposition.
A simple way is to just check whether we can derive all the original FDs
from the FDs present after decomposition.
Question : We know that for lossless decomposition common attribute should be
candidate key in one of the relation. A) A->B, B->CD R1(AB) and R2(BCD) B is the
key of second and hence decomposition is lossless. B) A->B, B->C, C->D R1(AB)
, R2(BC), R3(CD) B is the key of second and C is the key of third, hence
lossless. C) AB->C, C->AD R1(ABC), R2(CD) C is key of second, but C->A violates
BCNF condition in ABC as C is not a key. We cannot decompose ABC further as
AB->C dependency would be lost. D) A ->BCD Already in BCNF. Therefore,
Option C AB->C, C->AD is the answer.
Question 26
WRONG
Which of the following relational calculus expressions is not
safe?
AA
B
C
DD
Database Design(Normal Forms) GATE-CS-2001
Discuss it
Question 26 Explanation:
A tuple relational calculus expression may at times generate an infinite relation. It may
also contain values that do not even appear in the database. Such expressions are
said to be unsafe. A safe tuple relational calculus expression is the one which surely
generates finite results. To pose a restriction over the unsafety of expressions in tuple
relational calculus there is a concept of domain of a tuple relational formula denoted
by dom (P) is the set of values referenced by P i.e. values there in P or values in
tuple of a relation mentioned in P. Eg: The expression {t | ¬ (t € R)} is not safe
because there are infinitely many tuples that do not occur in R relation . In the above
question Options (A), (B) and option (D) produce finite set of tuples as each gives
out tuples restricted from a particular relation and hence are safe. Option (C)
produces infinite number of tuples as it generates all the tuples not in R1 i.e. it can
have tuples from any other relation other than R1.Hence it is not
safe. codex.cs.yale.edu/avi/db-book/db6/slide-dir/PPT-dir/ch6.ppt This solution is
contributed by Yashika Arora.
Question 27
WRONG
Consider a relation geq which represents “greater than or equal to”, that is, (x,y) ∈
geq only if y >= x.
create table geq
(
ib integer not null
ub integer not null
primary key 1b
foreign key (ub) references geq on delete cascade
)
Which of the following is possible if a tuple (x,y) is deleted?
A tuple (z,w) with z > y is deleted
Question 27 Explanation:
In the above question, the relation schema is ( lb , ub ), where lb is the primary key,
and ub is the foreign key which is referencing the primary key of its own relation.
Hence the table geq is both the master ( which has the referenced key ) as well as
the child table (which has the referencing key). The table has two constraint, one is
that if there is a tuple ( x, y ), then y is greater than or equal to x, And the other is
referential integrity constraint, which is on-cascade-delete on the foreign key. On-
cascade-delete says, that "When the referenced row is deleted from the other table
(master table), then delete also from the child table".
Suppose the instance in the given relation is the following:
x y
-----
5 6
4 5
3 4
6 6
Now if we delete tuple (5,6) then tuple ( 4,5 ) should also be deleted ( as 5 in the
tuple (4, 5) was referencing to 5 in the tuple(5,6) which no longer exist, hence the
referencing tuple should also be deleted), and as (4,5) got deleted hence tuple (3,4)
should also be deleted for the same reason. Therefore in total 3 rows have to be
deleted if tuple ( 5,6 ) is deleted. Now from the above instance we can say that if
(x,y), i.e. ( 5,6 ) gets deleted then a tuple ( z, w) i.e, ( 3, 4) is also deleted. And we
can see here that w < x. Hence option C.
Question 28
WRONG
Given the relations
employee (name, salary, deptno) and
department (deptno, deptname, address)
Which of the following queries cannot be expressed using the basic relational
algebra operations (U, -, x, , , p)?
Department address of every employee
Employees whose name is the same as their
B department name
The sum of all employees’ salaries
Question 28 Explanation:
See question 1 of http://www.geeksforgeeks.org/database-management-system-set-
1/
Question 29
WRONG
Given the following relation instance.
x y z
1 4 2
1 5 3
1 6 3
3 2 2
Which of the following functional dependencies are satisfied by the instance? (GATE
CS 2000)
XY -> Z and Z -> Y
YZ -> X and Y -> Z
Question 29 Explanation:
See question 2 of http://www.geeksforgeeks.org/database-management-system-set-
1/
Question 30
WRONG
Consider an Entity-Relationship (ER) model in which entity sets E1 and E2 are
connected by an m : n relationship R12, E1 and E3 are connected by a 1 : n (1 on the
side of E1 and n on the side of E3) relationship R 13. E1 has two single-valued
attributes a11 and a12 of which a11 is the key attribute. E2 has two single-valued
attributes a21 and a22 is the key attribute. E3 has two single-valued attributes a 31 and
a32 of which a31 is the key attribute. The relationships do not have any attributes. If a
relational model is derived from the above ER model, then the minimum number of
relations that would be generated if all the relations are in 3NF is ___________.
A2
3
4
D5
Database Design(Normal Forms) GATE-CS-2015 (Set 1)
Discuss it
Question 30 Explanation:
Entity E1.
a1 a12
--------
a11 is key
Entity E2
a21 a22
--------
a22 is key
Entity E3
a31 a32
--------
a31 is key
WRONG
Consider the relation X(P, Q, R, S, T, U) with the following set of functional
dependencies
F = {
{P, R} → {S,T},
{P, S, U} → {Q, R}
}
Which of the following is the trivial functional dependency in F+ is closure of F?
{P,R}→{S,T}
B {P,R}→{R,T}
{P,S}→{S}
D {P,S,U}→{Q}
Database Design(Normal Forms) GATE-CS-2015 (Set 3)
Discuss it
Question 31 Explanation:
A functional dependency X -> Y is trivial if Y is a subset of X.
Question 32
WRONG
Consider the following entity relationship diagram (ERD), where two entities E1 and
E2 have a relation R of cardinality 1 : m.
The attributes of E1 are A11, A12 and A13 where A11 is the key attribute. The
attributes of E2 are A21, A22 and A23 where A21 is the key attribute and A23 is a
multi-valued attribute. Relation R does not have any attribute. A relational database
containing minimum number of tables with each table satisfying the requirements of
the third normal form (3NF) is designed from the above ERD. The number of tables
in the database is
2
3
C5
D4
Database Design(Normal Forms) GATE-IT-2004
Discuss it
Question 32 Explanation:
Step 1: 1NF T1: A11, A12, A13 T2: A11, A21, A22, A23 //because A23 is
multivalued ,it has to be included in Key attribute Step 2: 2NF // A23 is Multivalued
attribute and not allowed in 2NF therefore new tables are: T1: A11, A12, A13 T2:
A11, A21, A22 T3: A21, A23 Step 3: 3NF // There is no transitive functional
dependency in all tables , So in 3NF Therefore answer is B
Question 33
WRONG
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
0 row and 4 columns
Question 33 Explanation:
Simple,Cartesian product of two tables will result
Rows = 3*2 = 6
Columns = 3+2 = 5
Option (D) is correct.
Question 34
WRONG
Consider the entities 'hotel room', and 'person' with a many to many relationship
B Hotel Room
Lodging
D None of these
Database Design(Normal Forms) Gate IT 2005
Discuss it
Question 34 Explanation:
Lodging is the only attribute relating person and hotel room.
Question 35
CORRECT
A table has fields Fl, F2, F3, F4, F5 with the following functional dependencies F1
→ F3 F2→ F4 (F1 . F2) → F5 In terms of Normalization, this table is in
1 NF
B 2 NF
C 3 NF
D none
Database Design(Normal Forms) Gate IT 2005
Discuss it
Question 35 Explanation:
First Normal Form A relation is in first normal form if every attribute in that relation
is singled valued attribute. Second Normal Form A relation is in 2NF iff it has No
Partial Dependency, i.e., no non-prime attribute (attributes which are not part of any
candidate key) is dependent on any proper subset of any candidate key of the table.
This table has Partial Dependency f1->f3, f2-> f4 given (F1,F2) is Key So answer
is A
Question 36
WRONG
Which of the following is NOT a superkey in a relational schema with attributes V, W,
X, Y, Z and primary key V Y ?
VXYZ
VWXZ
C VWXY
D VWXYZ
Database Design(Normal Forms) GATE-CS-2016 (Set 1)
Discuss it
Question 36 Explanation:
Super key = Candidate Key + other attributes. But option B does not include Y which
is a part of PK or candidate key.
Question 37
WRONG
Let R (A, B, C, D, E, P, G) be a relational schema in which the following functional
dependencies are known to hold: AB → CD, DE → P, C → E, P → C and B → G.
The relational schema R is
in BCNF
Question 37 Explanation:
Candidate key = AB
B->G is partial dependency
So, not in 2NF
Question 38
CORRECT
Which option is true about the SQL query given below?
SELECT firstName, lastName
FROM Employee
WHERE lastName BETWEEN 'A%' AND 'D%';
It will display all the employees having last
Question 38 Explanation:
The BETWEEN operator works with the range of character values also.
Question 39
WRONG
Which of the given options define a transaction correctly?
A transaction consists of DDL statements on
database session.
A transaction consists of collection of DML
Question 39 Explanation:
A database transaction consists of one or more DML statements to constitute one
consistent change in data, or a DDL statement or a DCL command (GRANT or
REVOKE). It starts with the first DML statement and ends with a DCL or DDL or TCL
(COMMIT or ROLLBACK) command. Note that DDL and DCL commands hold auto
commit feature.
Question 40
WRONG
Let R = ( A, B, C, D, E, F ) be a relation scheme with the following dependencies:
C→F, E→A, EC→D, A→B. Which of the following is a key of R?
CD
EC
C AE
D AC
Database Design(Normal Forms) GATE CS 1999
Discuss it
Question 40 Explanation:
To check find the closure for all {CD} = {CDF} {EC} = {ECDAFB} Only this is the key
because it drives all attributes. {AE} = {AEB} {AC} = {ACBF} Hence, Option (B) is
Correct.
Question 41
WRONG
Consider the schema R= ( S, T, U, V ) and the dependencies S→T, T→U, U→V and
V→S. Let R (R1 and R2) be a decomposition such that R1∩R2 ≠ Ø. The
decomposition is:
Not in 2NF
Question 41 Explanation:
R1∩R2 ≠ Ø means there is common attribute in R1 and R2. Now if we choose a
decomposition positively then we can choose something like R1(S, T, U) and R2(U,
V) then we can say that decomposition is lossless because common attribute is U
and LHS of every FDs are candidate key, therefore it is in 2NF as well as 3NF.
Option (D) is correct.
Question 42
WRONG
Which normal form is considered adequate for normal relational database design?
A 2NF
B 5NF
4NF
3NF
Database Design(Normal Forms) GATE CS 1998
Discuss it
Question 42 Explanation:
3NF is sufficient because because most of the 3NF tables are free of insertion,
update, and deletion anomalies. Moreover, 3NF always ensures functional
dependency preserving and lossless. So, option (D) is correct.
Question 43
Consider the following database relations containing the attributes
Book_id
Subject_Category_of_book
Name_of_Author
Nationality_of_Author
Question 44
CORRECT
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
in first normal form but not in second normal
form
in second normal form but not in first normal
B form
C in third normal form
D None of the above
Database Design(Normal Forms) GATE CS 1997
Discuss it
Question 44 Explanation:
Candidate Key of above relation is :- ab only. a and b is partial attribute (part of the
CK) that’s why the given FD is partially dependents. In 2NF there must not be
partially dependents FD and we know that every table is already in 1NF. Hence, this
relation is in first normal form but not in second normal form. Option (A) is correct.
Question 45
WRONG
Which of the following FD can’t be implied from FD set: {A->B, A->BC, C->D} ?
A->C
B->D
C BC->D
D All of the above
Database Design(Normal Forms) GATE CS Mock 2018
Discuss it
Question 45 Explanation:
A->C can be implied by A->BC and BC->D can be implied by C->D. But we can not
get B->D sing given functional dependencies. Option (B) is correct.
Question 46
CORRECT
Consider a database with the following schema:
Person ( name, age, gender )
name is a key
Frequents ( name, pizzeria )
(name, pizzeria) is a key
Eats ( name, pizza )
(name, pizza) is a key
Serves ( pizzeria, pizza, price )
(pizzeria, pizza) is a key
Relational algebra expression for query "Names of all people who frequent only
pizzeria's serving at least one pizza they eat" is
C
DNone of the above
Database Design(Normal Forms) GATE CS Mock 2018
Discuss it
Question 46 Explanation:
Find names of all people who frequent only pizzerias serving at least one pizza they
eat :
WRONG
How many minimum relation tables are required which satisfy
1NF?
2, 2, and 1 respectively
B 2, 2, and 2 respectively
1, 2, and 1 respectively
D 1, 1, and 1 respectively
Database Design(Normal Forms) GATE CS Mock 2018 | Set 2
Discuss it
Question 47 Explanation:
First ER model will required minimum number of two tables for 1NF with {E2R}, and
{E1}. "Many" side of the relation can be merged because it is many to one relation
and participation is partial both sides of the relation. Second ER model will required
minimum number of two tables for 1NF with {E2R}, and {E1}. "One" side entity
cannot be merged because it has total participation in "many" side of the relationship
and "one" side of the relationship is participating partially. Third ER model will
required minimum number of 1 table if no redundancy is occurred. It is a many to
many relationship but total participation is here both sides of the relationship.
Therefore, (A) 2, 2, and 1 respectively is correct.
Question 48
WRONG
Consider the following four relational schemas. For each schema, all non-trivial
functional dependencies are listed, The underlined attributes are the respective
primary keys.
Schema I: Registration(rollno, courses) Field ‘courses’ is a set-valued attribute
containing the set of courses a student has registered for. Non-trivial functional
dependency rollno → courses
Schema II: Registration (rollno, coursid, email) Non-trivial functional
dependencies: rollno, courseid → email email → rollno
Schema III: Registration (rollno, courseid, marks, grade) Non-trivial functional
dependencies: rollno, courseid, → marks, grade marks → grade
Schema IV: Registration (rollno, courseid, credit) Non-trivial functional
dependencies: rollno, courseid → credit courseid → credit
Which one of the relational schemas above is in 3NF but not in BCNF?
A Schema I
Schema II
Schema III
D Schema IV
Database Design(Normal Forms) GATE CS 2018
Discuss it
Question 48 Explanation:
Schema I: Registration(rollno, courses) Field ‘courses’ is a set-valued
attribute containing the set of courses a student has registered for. Non-
trivial functional dependency rollno → courses Since, rollno is primary
key, so this relation is in BCNF as well as 3 NF.
Schema II: Registration (rollno, coursid, email) Non-trivial functional
dependencies: rollno, courseid → email email → rollno Since, {rollno,
coursid} is primary key so rollno and coursid are prime attributes. email
is non-prime attribute. Functional depedency (FD) rollno, courseid →
email is in BCNF and 3NF, but FD email → rollno violates the rule of
BCNF because email is not superkey. But it satifies rule of 3 NF because
rollno is prime-attribute. So, overall this relation is in 3 NF but not in
BCNF.
Schema III: Registration (rollno, courseid, marks, grade) Non-trivial
functional dependencies: rollno, courseid, → marks, grade marks →
grade Since rollno, courseid is primary key, so rollno and courseid are
prime attributes and marks and grade are non-prime attributes.
FD rollno, courseid, → marks, grade satisfies BCNF as well as 3 NF.
FD marks → grade does not satifies 3 NF because nither marks is
superkey nor grade is prime-attribute. So, aslo can not be in BCNF. So,
overall this relation is not in 3 NF and not in BCNF but it does not
violates rule of 2 NF, so can be only in 2 NF.
Schema IV: Registration (rollno, courseid, credit) Non-trivial functional
dependencies: rollno, courseid → credit courseid → credit Since, rollno,
courseid is primary key, so rollno and courseid are prime-attributes and
credit is non-prime attribute. FD rollno, courseid → credit satifies
BCNF as well as 3 NF. FD courseid → credit violates rule of 2 NF, so
can not be in 2NF. So, overall this is not in 2 NF, 3 NF, and BCNF. But
it is only in 1 NF.
Therefore only schema-II is in 3 NF but not in BCNF. Option (B) is correct.
Question 49
WRONG
In RDBMS, different classes of relations are created using __________ technique to
prevent modification anomalies.
Functional Dependencies
B Data integrity
C Referential integrity
Normal Forms
ER and Relational Models Database Design(Normal Forms) UGC-NET CS
2017 Nov - II
Discuss it
Question 49 Explanation:
Functional dependency is a constraint that describes the relationship between
attributes in a relation. Data integrity refers to the accuracy and consistency of data
stored in a database, data warehouse, data mart or other construct. Referential
integrity is a relational database concept, which states that table relationships must
always be consistent. Normalization is a process of organizing the data in database
to avoid data redundancy, insertion anomaly, update anomaly & deletion anomaly.
1NF, 2NF, 3NF and BCNF are types of normal forms. So, option (D) is correct.
Question 50
WRONG
Consider the following table : Faculty (facName, dept, office, rank, dateHired)
FACNA DE OFFI DATEHI
RANK
ME PT CE RED
Profess
Ravi Art A101 1975
or
Assista
Murali Math M201 2000
nt
Narayan Art A101 Associ 1992
an ate
Profess
Lakshmi Math M201 1982
or
Profess
Mohan CSC C101 1980
or
Profess
Lakshmi Math M201 1982
or
Associ
Sreeni Math M203 1990
ate
Instruct
Tanuja CSC C101 2001
or
Associ
Ganesh CSC C105 1995
ate
(Assume that no faculty member within a single department has same name. Each
faculty member has only one office identified in office). 3NF refers to third normal
form and BCNF refers to Boyee-Codd Normal Form Then Faculty is
C In 3NF, in BCNF
Not in 3NF, not in BCNF
Database Design(Normal Forms) ISRO CS 2017
Discuss it
Question 50 Explanation:
There are two non-trivial functional dependencies (FD) in given table:
facName → dept, office, rank, datehired
office → dept
Given, Each faculty member has only one office identified in office, that
means facName is the primary key (so superkey). Therefore, FD facName → dept,
office, rank, datehired is in 3 NF as well as in BCNF, because facName is the
primary key. But FD office → dept is not in BCNF because office is not superkey
but dept is in 3 NF as dept is the prime attribute because {dept, rank} is super key.
So, overall relation Faculty is in 3 NF but not in BCNF. Option (B) is correct.
Question 51
WRONG
If every non-key attribute is functionally dependent on the primary key, then the
relation is in __________ .
First normal form
Second normal form
Question 51 Explanation:
Conditions for various normal forms:
1. 1 NF - A relation R is in first normal form (1NF) if and only if all
underlying domains contain atomic values only.
2. 2 NF - A relation R is in second normal form (2NF) if and only if it is in
1NF and every non-key attribute is fully dependent on the primary key.
3. 3 NF - A relation R is in third normal form (3NF) if and only if it is in
2NF and every non-key attribute is non-transitively dependent on the
primary key.
4. BCNF - A relation R is in Boyce-Codd normal form (BCNF) if and only
if every determinant is a candidate key.
Example: Relation R(XYZ) with functional dependencies {X -> Y, Y -> Z, X -> Z}.
Notice here Y -> Z, in question it is not mention that non prime attribute
is only dependent on primary key so this FD is perfectly valid. This relation is in 2NF
but not in 3NF because of every non-key attribute is transitively dependent on the
primary key. Here {X} will be candidate key. So, option (B) is correct.
Question 52
CORRECT
Consider a schema R(A, B, C, D) and following functional dependencies.
A → B
B → C
C → D
D → B
Then decomposition of R into R1 (A, B), R2(B, C) and R3(B, D) is __________ .
Dependency preserving and lossless join.
CORRECT
An attribute A of datatype varchar (20) has value ‘Ram’ and the attribute B of
datatype char (20) has value ‘Sita’ in oracle. The attribute A has _______ memory
spaces and B has _______ memory spaces.
A 20,20
3,20
C 3,4
D 20,4
Database Design(Normal Forms) UGC NET CS 2017 Jan - II
Discuss it
Question 53 Explanation:
varchar will acquire the exact memory of attribute and it varies from tuple to tuple
while char will acquire memory space which is define at the time of table creation it is
fixed: varchar(20) 'Ram' will take 3 and 'Sita' will take 20 character space in memory.
So, option (B) is correct.
Question 54
WRONG
Consider a schema R(MNPQ) and functional dependencies M → N, P → Q. Then
the decomposition of R into R1 (MN) and R2(PQ) is________.
Dependency preserving but not lossless join
Dependency preserving and lossless join
Question 54 Explanation:
Schema R(MNPQ) is decomposed into R1(MN) M → N is preserved and R2(PQ) P →
Q is also preserved, dependency will be preserved and there will be no loss of any
dependency. So, option (A) is correct.
Question 55
WRONG
For a database relation R(A, B, C, D) where the domains of A, B, C and D include
only atomic values, only the following functional dependencies and those that can be
inferred from them are : A → C B → D The relation R is in _______.
First normal form but not in second normal
form.
Both in first normal form as well as in second
normal form.
Second normal form but not in third normal
C form.
Both in second normal form as well as in
D third normal form.
Database Design(Normal Forms) UGC NET CS 2017 Jan - III
Discuss it
Question 55 Explanation:
A relation is in first normal form if every attribute in that relation is single valued
attribute. It is in 1NF. {A,B} are prime attribtes and {C,D} are non-prime attribute. A + =
{A,C} B+ = {B,D} {A,B}+ = {A,B,C,D} so AB is the key. But A+ = {A,C} B+ = {B,D} makes
it partial dependency. So, this relation is not in 2NF. So, option (A) is correct.
Question 56
WRONG
Let R = (A, B, C, D, E, F) be a relation schema with the following dependencies C-
>F, E->A, EC->D, A->B. Which of the following is a key of R?
CD
EC
C AE
D AC
Database Design(Normal Forms) ISRO CS 2015
Discuss it
Question 56 Explanation:
Functional Dependencies of R = C->F, E->A, EC->D, A->B Through the attributes C
and E, we get all other attributes present in R. So, EC is the key of R.
Question 57
WRONG
DBMS provides the facility of accessing data from a database through
DDL
DML
C DBA
D Schema
Database Design(Normal Forms) UGC NET CS 2016 Aug – II
Discuss it
Question 57 Explanation:
1- DML stands for data manipulation language. The SQL commands that deals with
the manipulation of data present in the database belong to DML or Data
Manipulation Language including retrieving, storing, modification, deletion, insertion
and updation of data in a database. Examples of DML: SELECT, INSERT, UPDATE,
DELETE. 2- DDL - Data Definition Language - This commands in SQL includes the
creation, deletion and modification of structure of database objects. Examples of
DDL commands: CREATE, DROP, ALTER, TRUNCATE, COMMENT, RENAME. It
provides the facility of accessing data from a database. 3- Functions of a DBA
include: Schema definition, Storage structure and access-method definition, Schema
and physical-organization modification, Granting of authorization for data access,
Routine maintenance. 4- Schema: The term "schema" refers to the organization of
data as a blueprint of how the database is constructed (divided into database tables
in the case of relational databases). The formal definition of a database schema is a
set of formulas (sentences) called integrity constraints imposed on a database. So,
option (A) is correct.
Question 58
CORRECT
Consider a database table R with attributes A and B. Which of the following SQL
queries is illegal ?
A SELECT A FROM R;
SELECT A, COUNT(*) FROM R;
SELECT A, COUNT(*) FROM R GROUP
C BY A;
SELECT A, B, COUNT(*) FROM R
D GROUP BY A, B;
Database Design(Normal Forms) UGC NET CS 2016 Aug – II
Discuss it
Question 58 Explanation:
SELECT A FROM R; legal query SELECT A, COUNT(*) FROM R; Illegal
query because we can't SELECT A, COUNT(*) unless it is grouped by A. SELECT
A, COUNT(*) FROM R GROUP BY A; legal query SELECT A, B, COUNT(*) FROM
R GROUP BY A, B; legal query So, option (B) is correct.
Question 59
CORRECT
Consider the schema R(A, B, C, D) and the functional dependencies A->B and C-
>D. If the decomposition is made as R1(A,B) and R2(C,D), then which of the
following is TRUE?
Preserves dependency but cannot perform
lossless join
Preserves dependency and performs lossless
B join
Does not perform dependency and cannot
C perform lossless join
Does not preserve dependency but perform
D lossless join
Database Design(Normal Forms) ISRO CS 2014
Discuss it
Question 59 Explanation:
schema: R(A, B, C, D)
functional dependencies: A->B and C->D
Decomposed Schema: R1(A,B) and R2(C,D)
Check for dependency preserving: A decomposition is said to be dependency
preserving if F+ = (F1 ∪ F2 ∪ .. Fn)+,where F+ = total functional dependencies(FDs)
on universal relation R, and F1 = set of FDs of R1, F2 = set of FDs of R2 and so on.
R1(A,B)
A->B is covered
R2(C,D)
C->D is covered.
Both the functional dependencies are covered, so FD preserving. Check for
lossless join: Decomposition of R into R1 and R2 is a lossless-join decomposition if
at least one of the following functional dependencies are in F+
R1 ∩ R2 -> R1
R1 ∩ R2 -> R2
Here, R1(A,B) ∩ R2(C,D) = null So, it can not perform a lossless join. Option (A) is
correct.
Question 60
WRONG
Which of the following statements is/are True regarding some advantages that an
object-oriented DBMS (OODBMS) offers over a relational database ? I. An
OODBMS avoids the “impedance mismatch” problem. II. An OODBMS avoids the
“phantom” problem. III. An OODBMS provides higher performance concurrency
control than most relational databases. IV. An OODBMS provides faster access to
individual data objects once they have been read from disk.
II and III only
I and IV only
Question 60 Explanation:
An OODBMS avoids the “impedance mismatch” problem.Correct.
An OODBMS doesn't avoids the “phantom” problem.
An OODBMS doesn't provides higher performance concurrency control
than most relational databases. Since it is distributed.
An OODBMS provides faster access to individual data objects once they
have been read from disk.Correct
SO, option (B) is correct.
Question 61
WRONG
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?
{x,y} and {a,b}
{x} and {a,b}
Question 61 Explanation:
A Candidate key is the minimal Superkey i.e. it is a minimal set of attributes required
to identify a tuple. {x} ; {a,b} are the candidate keys for the above schema as they do
not contain any extraneous attribute. So, option (B) is correct.
Question 62
WRONG
Which one of the following pairs is correctly matched in the context of database
design?
(1)
B (2)
C (3)
(4)
Database Design(Normal Forms) UGC NET CS 2016 Aug - III
Discuss it
Question 62 Explanation:
Result of taking a subset of a higher-level entity set to form a lower-level
entity set is Specialization
Result of taking the union of two or more disjoint(lower-level) entity sets
to produce a higher-level entity set is Generalization
An abstraction in which relationship sets (along with their associated
entity sets) are treated as higher-level entity sets, and can participate in
relationships.Aggregation
Express the number of entities to which another entity can be associated
via a relationship set Mapping cardinalities
So, option (D) is correct.
Question 63
WRONG
Consider the following table < img src = "https://www.geeksforgeeks.org/wp-
content/uploads/ISRO64.png "> The table is in which normal form?
Question 64
WRONG
In RDBMS, the constraint that no key attribute (column) may be NULL is referred to
as:
A Referential integrity
Multi-valued dependency
Entity Integrity
D Functional dependency
Database Design(Normal Forms) UGC NET CS 2016 July – II
Discuss it
Question 64 Explanation:
In RDBMS, the constraint that no key attribute (column) may be NULL
is referred to as Entity Interity
Referential integrity states that table relationships must always be
consistent.
Multi-valued dependencyis a full constraint between two sets of
attributes in a relation
Functional dependency is a relationship that exists when one attribute
uniquely determines another attribute.
So, option (C) is correct.
Question 65
WRONG
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.
Both D1 and D2
B Neither D nor D1 2
C Only D 1
Only D2
Database Design(Normal Forms) UGC NET CS 2016 July – III
Discuss it
Question 65 Explanation:
Only D2 is True because AD is key and present in both the tables. D1 is not always
true because FD’s not given and if we take B->A and C->A then it is lossy
decomposition because no common attributes contain key from one of the table.
Question 66
WRONG
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
First Normal Form
Second Normal Form
Question 66 Explanation:
Candidate key = ISBN For a relation having functional dependencies of the form α →
β, a relation is in 2-NF if: i) α should not be a proper subset of the candidate key, or,
ii) β - α should be a prime attribute. First condition satisfies as the candidate key
contains only one attribute. So, this relation is in 2-NF
Question 67
WRONG
Consider a “CUSTOMERS” database table having a column “CITY” filled with all the
names of Indian cities (in capital letters). The SQL statement that finds all cities that
have “GAR” somewhere in its name, is:
Select * from customers where city =
‘%GAR%’;
Select * from customers where city =
B ‘$GAR$’;
Select * from customers where city like
‘%GAR%’;
Select * from customers where city as
D ‘%GAR’;
Database Design(Normal Forms) UGC NET CS 2015 Dec - II
Discuss it
Question 68
CORRECT
match the following datbas terms to their
function:
A (1)
(2)
C (3)
D (4)
Database Design(Normal Forms) UGC NET CS 2015 Dec - II
Discuss it
Question 68 Explanation:
Normalization reduces data redundancy in a database
Data Dictionary contains metadata describing database structuredefines
view(s) of the database for particular user(s)
Referential Integrity enforces match of primary key to foreign key
External Schema defines view(s) of the database for particular user(s)
So, option (B) is correct.
Question 69
WRONG
Data which improves the performance and accessibility of the database are called:
Indexes
User Data
C Application Metadata
D Data Dictionary
Database Design(Normal Forms) UGC NET CS 2015 Dec - II
Discuss it
Question 69 Explanation:
Data which improves the performance and accessibility of the database are called
indexes because index is a type of any data which improves the lookup table. Simply
we can say that an index is a pointer to data in a table which increases the
accessibility in a book or databases, we can easily access any information with the
help of index. Option (A) is correct
Question 70
CORRECT
Which type of DBMS provides support for maintaining several versions of the same
entity?
System
D Network
Database Design(Normal Forms) ISRO CS 2011
Discuss it
Question 70 Explanation:
Object Oriented Database Management Systems allow object-oriented programmers
to develop the product, store them as objects, and replicate or modify existing
objects to make new objects within the OODBMS. Option (C) is correct.
Question 71
WRONG
Which normal form is based on the concept of 'full functional dependency'?
First Normal Form
Second Normal Form
Question 71 Explanation:
A full functional dependency is a state of database normalization similar to Second
Normal Form (2NF). It means that the schema should meet the requirements of First
Normal Form (1NF), and all non-key attributes are fully functionally dependent on the
primary key and partial dependency on the candidate key should not exist. So,
Option (B) is correct.
Question 72
CORRECT
Consider the following database table: Create table test( one integer, two integer,
primary key(one), unique(two), check(one >= 1 and <= 10), check(two >= 1 and <=
5) ); How many data records/tuples atmost can this table containt?
5
B 10
C 15
D 50
Database Design(Normal Forms) UGC NET CS 2015 Dec – III
Discuss it
Question 72 Explanation:
check(one >= 1 and <= 10), check(two >= 1 and <= 5).
Here second constraint will decide the no of tuples(record). Or we can say that the
common condition will dominate.
i.e. check(two >= 1 and <= 5) 5 tuples.
So, option (A) is correct.
Question 73
WRONG
Consider the following three tables R, S and T. In this question, all the join
operations are natural joins (⨝). (π) is the projection operation of a
relation: (a
) (b) (c
) (d)
(a)
(b)
C (c)
D (d)
Database Design(Normal Forms) UGC NET CS 2015 Dec – III
Discuss it
Question 74
WRONG
Purpose of 'Foreign Key' in a table is to ensure
Null Integrity
Referential Integrity
C Domain Integrity
D Null and Domain Integrity
Database Design(Normal Forms) ISRO CS 2009
Discuss it
Question 74 Explanation:
A FOREIGN KEY is a field (or collection of fields) in one table that refers to the
PRIMARY KEY in another table. The table containing the foreign key is called the
child table, and the table containing the candidate key is called the referenced or
parent table. Although there may be exceptions, the values in the foreign key
columns usually must correspond to values existing in the set of primary key values.
This correspondence requirement is created in a database using a referential
integrity constraint on the foreign key. Option (B) is correct.
Question 75
WRONG
Select the 'False' statement from the following statements about Normal Forms:
Lossless preserving decomposition into 3NF
is always possible
Lossless preserving decomposition into
Question 75 Explanation:
Lossless preserving decomposition into 3NF is always possible. True
Lossless preserving decomposition into BCNF is always possible. False Not
always possible.
Any Relation with two attributes is in BCNF. True
BCNF is stronger than 3NF. TrueFor more information on Normal form
Refer:Database Normalization | Normal Forms Option (B) is correct.
Question 76
CORRECT
The Relation Vendor Order (V_no, V_ord_no, V_name, Qty_sup, unit_price) is in
2NF because:
Non_key attribute V_name is dependent on
V_no which is part of composite key
Non_key attribute V_name is dependent on
B Qty_sup
Key attribute Qty_sup is dependent on
C primary_key unit price
Key attribute V_ord_no is dependent on
D primary_key unit price
Database Design(Normal Forms) UGC NET CS 2015 Jun - III
Discuss it
Question 76 Explanation:
The Relation Vendor Order (V_no, V_ord_no, V_name, Qty_sup, unit_price) is in
2NF because: Non_key attribute V_name is dependent on V_no which is part of
composite key. For more information on Normal forms Refer:Database Normalization
| Normal Forms Option (A) is correct.
Question 77
WRONG
BCNF is not used for cases where a relation has
Two (or more) candidate keys
Question 77 Explanation:
A relation is in BCNF if all attributes which are determinants are also candidate keys
in every relation. Transformation into BCNF deals with the problem of overlapping
keys and there is no problem with two or more CK. Option (D) is correct.
Question 78
CORRECT
The best normal form of relation scheme R(A, B, C, D) along with the set of
functional dependencies F = {AB → C, AB → D, C → A, D → B} is
Question 78 Explanation:
Here C-> A (prime attribute -> prime attribute) and D->A (prime attribute -> prime
attribute) is partially dependents FDs . This type of FD must not be in BCNF and
there is no problem with this type of FDs in 3NF. Option (B) is correct.
Question 79
WRONG
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, φ
ABCD, E
Φ, φ
D ABC, E
Database Design(Normal Forms) UGC NET CS 2014 Dec - III
Discuss it
Question 79 Explanation:
The attribute closures of A: A+ = ABCD The attribute closures of E: E+ = E. So, option
(B) is correct.
Question 80
CORRECT
Which of the following is false?
Every binary relation is never be in BCNF.
Question 80 Explanation:
Every binary relation is never be in BCNF. This statement is incorrect because
Every binary relation is always in BCNF.
Every BCNF relation is in 3NF. Correct.
1 NF, 2 NF, 3 NF and BCNF are based on functional dependencies. Correct.
Multivalued Dependency (MVD) is a special case of Join Dependency
(JD).Correct.So, option (A) is correct.
Question 81
For a database relation R(a,b,c,d) where the domains of a, b, c and d include only
atomic values, only the following functional dependencies and those that can be
inferred from them hold
a -> c
b -> d
The relation is in
First normal form but not in second normal
A form
Second normal form but not in third normal
B form
C Third normal form
D None of the above
Database Design(Normal Forms) ISRO CS 2018
Discuss it
Question 82
The set of attributes X will be fully functionally dependent on the set of attributes Y if
the following conditions are satisfied.
A X is functionally dependent on Y
X is not functionally dependent on any subset
B of Y
C Both (a) and (b)
D None of these
Database Design(Normal Forms) ISRO CS 2018
Discuss it
Question 83
Consider the relation R (ABCDE): FD = { A → B, B → C, C → D, D → E} Find out the
highest normal form.
A 1 NF
B 2 NF
C 3 NF
D BCNF
Database Design(Normal Forms) Practice Quiz for Sudo Placement
Discuss it
Question 84
Relations produced from E - R Model will always be in ________.
A 1 NF
B 2 NF
C 3 NF
D 4 NF
Database Design(Normal Forms) UGC NET CS 2018 July - II
Discuss it
Question 85
For a database relation R(a, b, c, d) where the domains of a, b, c and d include only
atomic values, and only the following functional dependencies and those that can be
inferred from them hold : a → c b → d The relation is in _________.
First normal form but not in second normal
A form
Second normal form but not in third normal
B form
C Third normal form
D BCNF
Database Design(Normal Forms) UGC NET CS 2018 July - II
Discuss it
Question 86
Consider a relational table R that is in 3NF, but not in BCNF. Which one of the
following statements is TRUE ?
R has a nontrivial functional dependency
Question 87
A relation r(A,B) in a relational database has 1200 tuples. The attribute A has integer
values ranging from 6 to 20, and the attribute B has integer values ranging from 1 to
20. Assume that the attributes A and B are independently distributed. The estimated
number of tuples in the output of σ(A>10)∨(B=18)(r) is ____________.
A 820
B 1200
C 960
D 1000
Database Design(Normal Forms) Permutation and Combination GATE CS
2021 | Set 1
Discuss it
Question 88
Consider the following statements S1 and S2 about the relational data model:
S1: A relation scheme can have at most one foreign key.
S2: A foreign key in a relation scheme R cannot be used to refer to tuples of R.
Which one of the following choices is correct?
Question 89
Suppose the following functional dependencies hold on a relation U with attributes
P,Q,R,S, and T:
P → QR
RS → T
Which of the following functional dependencies can be inferred from the above
functional dependencies?
A PS → T
B R→T
C P→R
D PS → Q
Database Design(Normal Forms) GATE CS 2021 | Set 2
Discuss it
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Normal
Forms”.
For any pincode, there is only one city and state. Also, for given street, city and state,
there is just one pincode. In normalization terms, empdt1 is a relation in
a) 1 NF only
b) 2 NF and hence also in 1 NF
c) 3NF and hence also in 2NF and 1NF
d) BCNF and hence also in 3NF, 2NF and 1NF
View Answer
Answer: b
Explanation: The relation in second normal form is also in first normal form and no partial
dependencies on any column in primary key.
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on
“Functional-Dependency Theory”.
1. We can use the following three rules to find logically implied functional dependencies.
This collection of rules is called
a) Axioms
b) Armstrong’s axioms
c) Armstrong
d) Closure
View Answer
Answer: b
Explanation: By applying these rules repeatedly, we can find all of F+, given F.
2. Which of the following is not Armstrong’s Axiom?
a) Reflexivity rule
b) Transitivity rule
c) Pseudotransitivity rule
d) Augmentation rule
View Answer
3. The relation employee(ID,name,street,Credit,street,city,salary) is decomposed into
advertisement
employee1 (ID, name)
employee2 (name, street, city, salary)
I.SELECT ee.empID
FROM Emps ee, Emps ff
WHERE ee.mgrID = ff.empID AND ff.mgrID = 123;
II.SELECT empID
FROM Emps
WHERE mgrID IN
(SELECT empID FROM Emps WHERE mgrID = 123);
Which, if any, of the two queries above will correctly (in SQL2) get the desired set of
employee ID’s?
a) Both I and II
b) I only
c) II only
d) Neither I nor I
View Answer
Answer: a
Explanation: The query can be satisfied by any of the two options.
8. Suppose relation R(A,B) currently has tuples {(1,2), (1,3), (3,4)} and relation S(B,C)
currently has {(2,5), (4,6), (7,8)}. Then the number of tuples in the result of the SQL
query:
<i>SELECT *
FROM R NATURAL OUTER JOIN S; </i>IS:
a) 2
b) 4
c) 6
d) None of the mentioned
View Answer
Answer: a
Explanation: The SQL NATURAL JOIN is a type of EQUI JOIN and is structured in such
a way that, columns with same name of associate tables will appear once only.
9. Suppose now that R(A,B) and S(A,B) are two relations with r and s tuples,
respectively (again, not necessarily distinct). If m is the number of (not necessarily
distinct) tuples in the result of the SQL query:
R intersect S;
Then which of the following is the most restrictive, correct condition on the value of m?
a) m = min(r,s)
b) 0 <= m <= r + s
c) min(r,s) <= m <= max(r,s)
d) 0 <= m <= min(r,s)
View Answer
Answer: d
Explanation: The value of m must lie between the min value of r and s and 0.
10. Suppose relation R(A,B,C,D,E) has the following functional dependencies:
A -> B
B -> C
BC -> A
A -> D
E -> A
D -> E
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Keys”.
1. Which one of the following is a set of one or more attributes taken collectively to
uniquely identify a record?
a) Candidate key
b) Sub key
c) Super key
d) Foreign key
View Answer
Answer: c
Explanation: Super key is the superset of all the keys in a relation.
2. Consider attributes ID, CITY and NAME. Which one of this can be considered as a
super key?
a) NAME
b) ID
c) CITY
d) CITY, ID
View Answer
Answer: b
Explanation: Here the id is the only attribute which can be taken as a key. Other
attributes are not uniquely identified.
3. The subset of a super key is a candidate key under what condition?
a) No proper subset is a super key
b) All subsets are super keys
c) Subset is a super key
d) Each subset is a super key
View Answer
Answer: a
Explanation: The subset of a set cannot be the same set. Candidate key is a set from a
super key which cannot be the whole of the super set.
advertisement
4. A _____ is a property of the entire relation, rather than of the individual tuples in which
each tuple is unique.
a) Rows
b) Key
c) Attribute
d) Fields
View Answer
Answer: b
Explanation: Key is the constraint which specifies uniqueness.
5. Which one of the following attribute can be taken as a primary key?
a) Name
b) Street
c) Id
d) Department
View Answer
Answer: c
Explanation: The attributes name, street and department can repeat for some tuples. But
the id attribute has to be unique. So it forms a primary key.
6. Which one of the following cannot be taken as a primary key?
a) Id
b) Register number
c) Dept_id
d) Street
View Answer
Answer: d
Explanation: Street is the only attribute which can occur more than once.
7. An attribute in a relation is a foreign key if the _______ key from one relation is used
as an attribute in that relation.
a) Candidate
b) Primary
c) Super
d) Sub
View Answer
Answer: b
Explanation: The primary key has to be referred in the other relation to form a foreign
key in that relation.
8. The relation with the attribute which is the primary key is referenced in another
relation. The relation which has the attribute as a primary key is called ______________
a) Referential relation
b) Referencing relation
c) Referenced relation
d) Referred relation
View Answer
Answer: c
Explanation: None.
9. The ______ is the one in which the primary key of one relation is used as a normal
attribute in another relation.
a) Referential relation
b) Referencing relation
c) Referenced relation
d) Referred relation
View Answer
Answer: c
Explanation: None.
10. A _________ integrity constraint requires that the values appearing in specified
attributes of any tuple in the referencing relation also appear in specified attributes of at
least one tuple in the referenced relation.
a) Referential
b) Referencing
c) Specific
d) Primary
View Answer
Answer: a
Explanation: A relation, say r1, may include among its attributes the primary key of
another relation, say r2. This attribute is called a foreign key from r1, referencing r2. The
relation r1 is also called the referencing relation of the foreign key dependency, and r2 is
called the referenced relation of the foreign key.