Computer Science MCQsकंप्यूटर साइंस एमसीक्यू · डीबीएमएस: की और नॉर्मलाइज़ेशन
DBMS: Keys and Normalisationडीबीएमएस: की और नॉर्मलाइज़ेशनquestions and answersप्रश्न और उत्तर
Normalisation questions reward a fixed routine: find the candidate keys from the functional dependencies, then test each normal form in order.
Unlimitedअसीमितfresh questionsनए प्रश्न
Answersउत्तरalways one tap awayहमेशा एक टैप दूर
1subtopicउप-टॉपिक
TCS NQT ~1
Practice questions are in English for now.अभ्यास के प्रश्न अभी अंग्रेज़ी में हैं।
How dbms: keys and normalisation worksडीबीएमएस: की और नॉर्मलाइज़ेशन को समझिए
Start with the closure of attribute sets. Any set whose closure is the whole relation is a superkey; the minimal ones are candidate keys.
Partial dependencies (on part of a key) break 2NF; transitive dependencies (key → X → A) break 3NF; any dependency whose left side is not a superkey breaks BCNF.
Decomposition must be lossless (the common attributes form a key of one part) and should preserve dependencies where possible.
Each trick says when to use it, why it works and when it fails. Formula tricks are checked by code over their whole range.हर ट्रिक बताती है कि उसे कब इस्तेमाल करें, वह क्यों काम करती है और कब नहीं। सूत्र वाली ट्रिक्स को कोड से उनकी पूरी रेंज पर जाँचा गया है।
Exam strategyपरीक्षा रणनीति
Find the keys first, then climb 1NF → 2NF → 3NF → BCNF
Use it when:कब इस्तेमाल करें: Any “highest normal form” question with functional dependencies.
Attributes that never appear on a right-hand side must be in every candidate key: start closures from them.
Check each dependency X → A: part of a key on the left → breaks 2NF; non-key → non-key → breaks 3NF (unless A is prime); X not a superkey → breaks BCNF.
Exampleउदाहरण
R(A, B, C), A → B, B → C
→ Key A; B → C is transitive (B not a key, C not prime) → 2NF but not 3NF.
Why it works, and when it failsयह क्यों काम करती है, और कब नहीं
Why:क्यों: Each normal form forbids one more kind of dependency, so testing them in order gives the highest form reached.
Limits:सीमाएँ: Multivalued dependencies (4NF) need a different test.
Solved examplesहल किए गए उदाहरण
Answers and full solutions are shown. Hide them to test yourself first.उत्तर और पूरे हल दिखाए गए हैं। पहले खुद को परखने के लिए इन्हें छिपाइए।
Example 1उदाहरण 1 · DBMS: Keys and Normalisation · Easyआसान
A table for students in a Mumbai college stores each student's phone numbers as a comma‑separated list in a single column. Which version of the table satisfies First Normal Form?
Each phone number in a separate row with the same student ID
The original table with comma‑separated phone numbers
A table where the phone column holds an array type
A table that allows NULL in the phone column
Answer:उत्तर:Each phone number in a separate row with the same student ID
Recall 1NF requires every attribute to hold a single atomic value.
Identify the column that stores multiple phone numbers.
Choose the representation where each phone number appears in its own row.
Example 2उदाहरण 2 · DBMS: Keys and Normalisation · Mediumमध्यम
Relation R(A, B, C, D) has functional dependencies A → B, C → D, and AC → B. Which of the following attribute sets is a super key but not a candidate key?
AC
ABC
A
B
Answer:उत्तर:ABC
Find candidate keys by computing closures: AC⁺ = {A, C, B, D} = all attributes, and no subset of AC is a key.
A super key is any superset of a candidate key. ABC contains AC, so it is a super key.
Since ABC has a proper subset (AC) that is a key, ABC is not minimal and therefore not a candidate key.
Example 3उदाहरण 3 · DBMS: Keys and Normalisation · Hardकठिन
Relation R(A, B, C, D) has functional dependencies A → B, C → D. It is decomposed into R1(A, B) and R2(C, D). Which of the following statements is true about this decomposition?
The decomposition is lossless‑join but does not preserve dependencies.
The decomposition preserves dependencies but is not lossless‑join.
The decomposition is both lossless‑join and dependency preserving.
The decomposition is neither lossless‑join nor dependency preserving.
Answer:उत्तर:The decomposition preserves dependencies but is not lossless‑join.
Compute intersection of R1 and R2 → empty set.
Lossless join needs (R1 ∩ R2) → R1 or (R1 ∩ R2) → R2; empty set cannot determine anything → not lossless.
Project FDs: R1 keeps A → B, R2 keeps C → D → all original FDs preserved.
Hence dependency preserving but not lossless.
Example 4उदाहरण 4 · DBMS: Keys and Normalisation · Mediumमध्यम
Relation R(A, B, C, D) has functional dependencies A → B, C → D, and AC → B. Which of the following attribute sets is a super key but not a candidate key?
AC
ABC
A
B
Answer:उत्तर:ABC
Find candidate keys by computing closures: AC⁺ = {A, C, B, D} = all attributes, and no subset of AC is a key.
A super key is any superset of a candidate key. ABC contains AC, so it is a super key.
Since ABC has a proper subset (AC) that is a key, ABC is not minimal and therefore not a candidate key.
Example 5उदाहरण 5 · DBMS: Keys and Normalisation · Mediumमध्यम
Relation R(A, B, C, D) has functional dependencies A → B, C → D, and AC → B. Which of the following attribute sets is a super key but not a candidate key?
AC
ABC
A
B
Answer:उत्तर:ABC
Find candidate keys by computing closures: AC⁺ = {A, C, B, D} = all attributes, and no subset of AC is a key.
A super key is any superset of a candidate key. ABC contains AC, so it is a super key.
Since ABC has a proper subset (AC) that is a key, ABC is not minimal and therefore not a candidate key.
Example 6उदाहरण 6 · DBMS: Keys and Normalisation · Mediumमध्यम
Relation R(A, B, C, D) has functional dependencies A → B, C → D, and AC → B. Which of the following attribute sets is a super key but not a candidate key?
AC
ABC
A
B
Answer:उत्तर:ABC
Find candidate keys by computing closures: AC⁺ = {A, C, B, D} = all attributes, and no subset of AC is a key.
A super key is any superset of a candidate key. ABC contains AC, so it is a super key.
Since ABC has a proper subset (AC) that is a key, ABC is not minimal and therefore not a candidate key.
Common mistakesआम गलतियाँ
Confusing a superkey with a candidate key.
Calling a relation BCNF because it is in 3NF.
Ignoring prime attributes in the 3NF test.
Frequently asked questionsअक्सर पूछे जाने वाले प्रश्न
What is the difference between 3NF and BCNF?
3NF allows X → A when A is a prime attribute even if X is not a superkey; BCNF does not allow it.
How do I find candidate keys quickly?
Attributes that never appear on a right side must be in every key; start the closure from them.
How are these questions checked?
Each is drafted, linted and then solved blind by a second AI model from a different family; only questions where both agree are published.