Closure of Functional Dependencies and Attribute Closure (X+) Notes in Hindi & English : FD क्लोज़र और एट्रिब्यूट क्लोज़र (X+): कैंडिडेट की की गणना विधि और 20 महत्वपूर्ण MCQ प्रश्न (Rajasthan IT Exam)

Post a Comment

PGDCA, BCA, B-Tech, MCA, M-Tech, B.Sc computer science राजस्थान सूचना सहायक व कंप्यूटर शिक्षक विशेष नोट्स: इस अध्याय में हम Closure of Functional Dependencies and Attribute Closure (X+) (FD क्लोज़र और एट्रिब्यूट क्लोज़र (X+): कैंडिडेट की की गणना विधि) की संपूर्ण थ्योरी, मुख्य तकनीकी बिंदु, तुलनात्मक तालिका और विगत परीक्षाओं के पैटर्न पर आधारित 20 अति-महत्वपूर्ण बहुविकल्पीय प्रश्न (MCQs) विस्तृत हिंदी व अंग्रेजी व्याख्या सहित पढ़ेंगे।

Overview: The closure of an FD set (F+) includes all implied FDs and can grow exponentially, whereas Attribute Closure (X+) computes all attributes determined by X in polynomial time. Computing X+ is the core algorithmic engine for testing FD membership, finding Candidate Keys, verifying Equivalence, and building Canonical Covers.

अध्याय सार: FD क्लोज़र (F+) में सभी निहित FDs आती हैं जिनका आकार घातांकीय हो सकता है, जबकि एट्रिब्यूट क्लोज़र (X+) बहुपदीय समय में वे सभी कॉलम निकालता है जो X द्वारा निर्धारित होते हैं। X+ की सहायता से कैंडिडेट की ज्ञात करना, FD समतुल्यता जांचना और कैनोनिकल कवर बनाना बेहद सरल हो जाता है।

Closure of Functional Dependencies and Attribute Closure (X+): Detailed Notes & Architecture (FD क्लोज़र और एट्रिब्यूट क्लोज़र (X+): कैंडिडेट की की गणना विधि)

1. FD Closure (F+) vs Attribute Closure (X+) Complexity (FD क्लोज़र (F+) बनाम एट्रिब्यूट क्लोज़र (X+))

[EN] F+ is the set of all functional dependencies logically implied by F via Armstrong's Axioms. Because a relation of n attributes has 2^n subsets, F+ can contain exponentially many FDs (up to O(2^(2n))), making explicit construction of F+ impractical. By contrast, Attribute Closure X+ is the set of all attributes functionally determined by X under F (A in X+ iff X -> A in F+), computable cleanly in polynomial time O(|F| * |R|) (or linear time via count-based optimization).

[HI] F+ में F से निकलने वाली सभी FDs शामिल होती हैं, जिनकी संख्या n कॉलम्स पर घातांकीय (Exponential) हो सकती है। इसके विपरीत, एट्रिब्यूट क्लोज़र (X+) केवल उन कॉलम्स का सेट है जिन्हें X निर्धारित करता है; इसे बहुपदीय समय O(|F|*|R|) में आसानी से निकाला जा सकता है।

2. Algorithm for Computing X+ and Membership Testing (X+ निकालने की एल्गोरिथम व FD सदस्यता परीक्षण)

[EN] To compute X+ under F: initialize closure = X; loop over all FDs (L -> R) in F, and whenever L ⊆ closure, update closure = closure ∪ R; repeat until an entire pass adds zero new attributes. To test whether any arbitrary FD (X -> Y) belongs to F+ without ever generating F+, simply compute X+ and check if Y ⊆ X+! Similarly, two FD sets F and G are equivalent (F+ = G+) iff every FD in F follows from G (via X+_G) AND every FD in G follows from F (via X+_F).

[HI] X+ निकालने के लिए result = X से शुरुआत करें और बार-बार F की हर FD (L -> R) जांचें: यदि L के सभी कॉलम result में मौजूद हैं, तो R को भी result में जोड़ दें जब तक परिवर्तन बंद न हो जाए। कोई FD (X -> Y) F+ में है या नहीं, यह जांचने के लिए बस यह देखें कि Y ⊆ X+ है या नहीं।

3. Systematic Method for Finding All Candidate Keys via X+ (X+ से सभी कैंडिडेट की (Candidate Keys) ज्ञात करने की विधि)

[EN] K is a Super Key of R iff K+ = R, and K is a Candidate Key (CK) iff K is minimal (no proper subset of K has closure = R). To find CKs rapidly in exams, classify attributes of R into: (1) Essential Attributes (attributes that NEVER appear on the RHS of any non-trivial FD in F)—these MUST appear in EVERY Candidate Key! Compute Essential+. If Essential+ = R, there is a SINGLE unique CK. Otherwise, minimally extend Essential with middle attributes (appearing on both sides); attributes appearing ONLY on RHS (never on LHS) can be excluded from minimal CKs.

[HI] K सुपर की है यदि K+ = R हो, और उसका कोई छोटा उपसमुच्चय सुपर की न हो तो K कैंडिडेट की (CK) है। परीक्षा की तेज ट्रिक: जो कॉलम किसी भी FD के दाईं ओर (RHS) कभी न आएँ, वे अनिवार्यतः हर कैंडिडेट की का हिस्सा होते हैं; पहले उन्हीं का क्लोज़र निकालें और ज़रूरत पड़ने पर क्रमशः अतिरिक्त कॉलम जोड़कर जांचें।

4. Canonical Cover (Minimal Cover Fc) Construction (कैनोनिकल कवर (Minimal Cover Fc) बनाने के चरण)

[EN] A Canonical Cover Fc is a minimal FD set equivalent to F containing zero redundancy. Constructing Fc takes three standard steps: (1) Split RHS to single attributes (optional/re-merge by LHS at end via Union); (2) Eliminate extraneous LHS attributes (in AB -> C, A is extraneous if C ∈ B+ under current F); (3) Eliminate redundant FDs (FD X -> Y is redundant if Y ∈ X+ computed using F - {X -> Y}). Beware: the order in which redundant FDs are removed can yield more than one valid minimal cover!

[HI] कैनोनिकल कवर (Fc) F के समतुल्य सबसे छोटा व अतिरिक्त-रहित FD सेट होता है। इसे बनाने के लिए: (1) RHS को सिंगल कॉलम में तोड़ें, (2) LHS से अनावश्यक (Extraneous) कॉलम हटाएँ (यदि B+ से ही C मिल जाए तो AB->C से A हटाएँ), और (3) पूरे सेट से अतिरिक्त (Redundant) FD को हटा दें।

Syntax, Formula & Technical Example (Closure of Functional Dependencies and Attribute Closure (X+))

-- Example: R(A, B, C, D) with F = { A -> B, B -> C, C -> A }
-- 1. Check RHS attributes: {B, C, A}. Missing from RHS = {D}!
--    Therefore D MUST belong to every Candidate Key.
-- 2. Compute D+   = {D}       (!= ABCD)
-- 3. Compute AD+  = {A,D,B,C} = R  --> AD is Candidate Key
-- 4. Compute BD+  = {B,D,C,A} = R  --> BD is Candidate Key
-- 5. Compute CD+  = {C,D,A,B} = R  --> CD is Candidate Key
-- Prime Attributes = {A, B, C, D}; Non-Prime = empty

Closure of Functional Dependencies and Attribute Closure (X+) Quick Reference & Comparison Table

Closure / Key ConceptExact Rule / FormulaAlgorithmic / Exam Significance
Attribute Closure (X+)Maximal set of attributes functionally determined by X under FComputed in polynomial time O(|F|*|R|)
FD Closure (F+)Complete set of all FDs implied by F via Armstrong's AxiomsExponential size in n attributes (up to O(2^(2n)))
Essential CK AttributesAttributes absent from EVERY RHS of FDs in FMandatory members of EVERY Candidate Key
FD Equivalence (F ≡ G)F+ = G+ (F covers G AND G covers F)Verified using X+ checks without building F+

Closure of Functional Dependencies and Attribute Closure (X+) Top 20 Bilingual MCQs with Answers

Q1. Given R(A, B, C, D, E) and F = {A -> B, BC -> D, D -> E}, what is {A, C}+?

(R(A, B, C, D, E) और F = {A -> B, BC -> D, D -> E} के लिए {A, C}+ का मान क्या होगा?)

(A) {A, C}

(B) {A, C, D}

(C) {A, B, C}

(D) {A, B, C, D, E}

Correct Answer: (D)

[EN] Start with {A,C}; A->B adds B ({A,B,C}); BC->D adds D ({A,B,C,D}); D->E adds E ({A,B,C,D,E}). Thus AC is a Super Key!

[HI] {A,C} से A->B द्वारा B मिलेगा ({A,B,C}), फिर BC->D से D और D->E से E जुड़कर पूरा सेट {A,B,C,D,E} प्राप्त होगा।

Q2. Using the SAME relation R(A,B,C,D,E) and F = {A->B, BC->D, D->E}, find ALL Candidate Keys.

(उसी प्रश्न R(A,B,C,D,E) और F = {A->B, BC->D, D->E} में कुल कितनी और कौन सी कैंडिडेट की (Candidate Keys) हैं?)

(A) Three keys: AC, AD, AE

(B) Only 1 Candidate Key: AC

(C) Two keys: AC and BC

(D) Only A

Correct Answer: (B)

[EN] Neither A nor C appears on ANY RHS of F! Therefore AC must lie in every CK; since {AC}+ = R, AC is the unique Candidate Key.

[HI] A और C दोनों किसी भी FD के RHS में नहीं आए हैं, इसलिए दोनों का हर CK में होना अनिवार्य है; {AC}+ = R होने से AC एकमात्र कैंडिडेट की है।

Q3. Given R(A, B, C, D) with F = {AB -> C, C -> D, D -> A}, how many Candidate Keys exist?

(R(A, B, C, D) और F = {AB -> C, C -> D, D -> A} के लिए कुल कितनी कैंडिडेट की (Candidate Keys) होंगी?)

(A) 2 Candidate Keys: AB and CD

(B) 1 Candidate Key: AB

(C) 3 Candidate Keys: AB, BC, and BD

(D) 4 Candidate Keys: A, B, C, D

Correct Answer: (C)

[EN] B never appears on any RHS (mandatory in every CK). Testing 2-attribute sets with B: AB+=ABCD, CB+=CBDA, DB+=DBAC. All three are CKs!

[HI] B किसी भी RHS में नहीं है इसलिए हर CK में B जरूर होगा। B के साथ AB, CB और DB तीनों का क्लोज़र पूरा ABCD आता है—कुल 3 CKs।

Q4. If relation R(P, Q, R, S) has FDs F = {Q -> R, R -> S}, meaning attribute P never appears in ANY FD, what must be true about P?

(यदि R(P, Q, R, S) में F = {Q -> R, R -> S} हो और कॉलम P किसी भी FD में बिल्कुल मौजूद न हो, तो P के बारे में क्या सत्य है?)

(A) P can never belong to any Candidate Key

(B) P is a non-prime attribute

(C) P must be part of EVERY Candidate Key (and every Super Key) of R

(D) P is automatically determined by Q

Correct Answer: (C)

[EN] An isolated attribute appearing in no FD cannot be determined by anything else, so every Candidate Key must include P (here the sole CK is PQ).

[HI] जो कॉलम किसी भी FD में न हो उसे कोई अन्य कॉलम निर्धारित नहीं कर सकता, अतः P हर कैंडिडेट की में अनिवार्य रूप से शामिल होगा।

Q5. What is the time complexity of checking if X -> Y belongs to F+ using Attribute Closure (X+)?

(एट्रिब्यूट क्लोज़र (X+) विधि से यह जांचने की समय जटिलता कितनी है कि क्या X -> Y, F+ में आता है?)

(A) Factorial time O(n!)

(B) Exponential time O(2^n)

(C) Polynomial time (O(|F| * |R|) basic loop, or O(size(F)) linear with counters)

(D) Constant time O(1) without reading F

Correct Answer: (C)

[EN] Unlike generating full F+ (exponential), computing X+ runs in fast polynomial (even linear) time.

[HI] पूरा F+ निकालने में घातांकीय समय लगता है, जबकि X+ की गणना तेज बहुपदीय (Polynomial) समय में हो जाती है।

Q6. Given F = {A -> B, B -> C, A -> C}, which FD is redundant when computing the Canonical Cover Fc?

(कैनोनिकल कवर (Fc) निकालते समय F = {A -> B, B -> C, A -> C} में कौन सी FD अतिरिक्त (Redundant) है?)

(A) None; all three are essential

(B) A -> B

(C) A -> C (since C ∈ A+ using {A->B, B->C})

(D) B -> C

Correct Answer: (C)

[EN] Removing A -> C leaves {A->B, B->C}, from which A+ = {A,B,C} still includes C by transitivity—hence A -> C is redundant.

[HI] A -> C को हटाने पर भी A->B और B->C से A+={A,B,C} निकल आता है, इसलिए A -> C अतिरिक्त है।

Q7. In F = {AB -> C, A -> B}, how do you detect and remove an extraneous attribute to minimize F?

(F = {AB -> C, A -> B} को कैनोनिकल कवर में बदलने के लिए अनावश्यक (Extraneous) कॉलम कैसे हटाते हैं?)

(A) A is extraneous in AB -> C

(B) Neither can be simplified

(C) B is extraneous in A -> B

(D) B is extraneous in AB -> C because A+ already contains B and C; simplify AB -> C to A -> C

Correct Answer: (D)

[EN] Testing if A alone suffices for AB -> C: compute A+ under F => {A, B, C}, which includes C! Thus B is extraneous on LHS of AB -> C.

[HI] AB -> C में यदि A का क्लोज़र {A,B,C} पहले से C दे देता है, तो B अनावश्यक है और AB -> C सरल होकर A -> C बन जाता है।

Q8. How do we verify that two FD sets F and G are Equivalent (F ≡ G)?

(यह कैसे जांचा जाता है कि दो अलग FD सेट F और G आपस में समतुल्य (Equivalent) हैं?)

(A) Check if F and G have the exact same count of FDs

(B) Compare only Candidate Keys of F and G

(C) Compute X+_G for every X->Y in F (verify Y⊆X+_G) AND compute X+_F for every X->Y in G (verify Y⊆X+_F)

(D) Check if F ∩ G is non-empty

Correct Answer: (C)

[EN] F ≡ G means F+ = G+, i.e., G logically implies every FD in F (F ⊆ G+) AND F logically implies every FD in G (G ⊆ F+).

[HI] F और G तभी समतुल्य हैं जब F की हर FD, G से (X+_G द्वारा) निकल सके और G की हर FD, F से (X+_F द्वारा) निकल सके।

Q9. If F and G produce the EXACT same set of Candidate Keys on R, does that guarantee F ≡ G (F+ = G+)?

(यदि एक ही टेबल पर F और G बिल्कुल समान कैंडिडेट की (Candidate Keys) देते हों, तो क्या F ≡ G हमेशा सत्य होगा?)

(A) NO — F and G can share identical Candidate Keys yet imply different non-key FDs!

(B) YES, only in 2NF

(C) YES, identical CKs always imply identical F+

(D) YES, if R has >= 3 attributes

Correct Answer: (A)

[EN] Example: R(A,B,C) with F={A->B, A->C} vs G={A->B, B->C}. Both have unique CK {A}, yet B->C holds in G+ and NOT in F+!

[HI] नहीं — समान कैंडिडेट की होने के बावजूद नॉन-की कॉलम्स के बीच की FDs (जैसे B->C) अलग हो सकती हैं, जिससे F+ ≠ G+ होगा।

Q10. What is the maximum number of distinct non-trivial FDs (or total FDs) that can exist over a relation with n attributes?

(n कॉलम्स वाले एक रिलेशन पर संभावित कुल FDs (F+) की अधिकतम संख्या किस क्रम की हो सकती है?)

(A) At most n^2

(B) Exactly n * (n - 1)

(C) Exponential in n (since 2^n subsets exist for LHS and 2^n subsets for RHS)

(D) Always 2 * n

Correct Answer: (C)

[EN] Any subset X ⊆ R can determine any subset Y ⊆ R, producing up to 2^(2n) pairs in the worst case (e.g., when all FDs hold).

[HI] n कॉलम्स से 2^n उपसमुच्चय बनते हैं, इसलिए कुल FDs की संख्या n के घातांकीय (Exponential) क्रम की हो सकती है।

Q11. Given R(A, B, C) and EMPTY FD set F = ∅, what is the only Candidate Key of R?

(यदि R(A, B, C) पर कोई भी नॉन-ट्रिवियल FD लागू न हो (F = ∅), तो R की कैंडिडेट की क्या होगी?)

(A) Three keys: A, B, C

(B) {A, B, C} (the entire relation schema)

(C) Empty set ∅

(D) No Candidate Key exists

Correct Answer: (B)

[EN] With F = ∅, for any proper subset X ⊂ ABC, X+ = X != ABC; only ABC+ = ABC, making the full attribute set the sole Candidate Key.

[HI] जब कोई FD न हो तो किसी भी छोटे सेट X का क्लोज़र X ही रहता है; अतः पूरा स्कीमा {A, B, C} ही एकमात्र कैंडिडेट की बनता है।

Q12. Given F = {A -> BC, B -> A, C -> D} on R(A, B, C, D), which statement is TRUE about the Candidate Keys?

(R(A, B, C, D) और F = {A -> BC, B -> A, C -> D} के लिए कैंडिडेट की के बारे में कौन सा कथन सत्य है?)

(A) Only A is a Candidate Key

(B) AB is the single minimal Candidate Key

(C) Both A and B are Candidate Keys (making A, B Prime and C, D Non-Prime)

(D) C and D are also Candidate Keys

Correct Answer: (C)

[EN] A+ = {A,B,C,D} = R and B+ = {B,A,C,D} = R! Because A and B each determine R alone, A and B are both 1-attribute CKs.

[HI] A+ = ABCD और B+ = ABCD दोनों पूरा स्कीमा देते हैं; अतः A और B दो अलग-अलग कैंडिडेट की हैं तथा C व D नॉन-प्राइम हैं।

Q13. Suppose R(A,B,C,D) has Candidate Keys {A, BC}. How many Super Keys does R contain? (Compute carefully!)

(यदि R(A, B, C, D) की कैंडिडेट की केवल {A} और {BC} हैं, तो R में कुल कितनी सुपर की (Super Keys) होंगी?)

(A) 12 Super Keys

(B) 10 Super Keys

(C) 4 Super Keys

(D) 8 Super Keys

Correct Answer: (B)

[EN] Supersets of {A}: 2^3 = 8 (fix A, choose any subset of BCD). Supersets of {BC} NOT containing A: fix BC, omit A, choose subset of {D} => 2^1 = 2. Total = 8 + 2 = 10!

[HI] A वाले सुपरसेट = 2^3 = 8; और बिना A के BC वाले सुपरसेट (BC, BCD) = 2। कुल सुपर की = 8 + 2 = 10!

Q14. Which statement is NOT true regarding Canonical Cover (Minimal Cover) Fc of an FD set F?

(कैनोनिकल कवर (Fc) के संबंध में कौन सा कथन असत्य (NOT true) है?)

(A) Fc contains no redundant FDs

(B) Fc+ = F+ always holds

(C) Every FD set F always has a strictly UNIQUE Canonical Cover Fc

(D) Fc contains no extraneous attributes in LHS or RHS

Correct Answer: (C)

[EN] Depending on which redundant FD or extraneous attribute is tested and dropped first, an FD set F can have multiple distinct valid Canonical Covers!

[HI] यह असत्य है कि Fc हमेशा अद्वितीय (Unique) होता है—क्योंकि FDs को जांचने के क्रम के अनुसार एक ही F के एक से अधिक वैध कैनोनिकल कवर बन सकते हैं।

Q15. When checking if attribute A is extraneous in LHS of AB -> C under F, which closure do we correctly compute?

(AB -> C के LHS से कॉलम A अनावश्यक (Extraneous) है या नहीं, यह जांचने के लिए किसका क्लोज़र निकालते हैं?)

(A) Compute C+ under F

(B) Compute A+ under F and check whether B ∈ A+

(C) Compute B+ under current F and check whether C ∈ B+

(D) Compute AB+ under F - {AB -> C}

Correct Answer: (C)

[EN] If B alone already determines C under F (C ∈ B+), then A contributes nothing in AB -> C and can be dropped safely.

[HI] यदि अकेले B का क्लोज़र B+ (F के अंतर्गत) पहले से C को शामिल कर ले, तो AB -> C में A अनावश्यक (Extraneous) सिद्ध हो जाता है।

Q16. If X is a Super Key of R, what MUST X+ equal?

(यदि X किसी रिलेशन R की सुपर की (Super Key) है, तो X+ किसके बराबर होना अनिवार्य है?)

(A) Only X itself

(B) All attributes of R (X+ = R)

(C) Empty set

(D) Only Prime attributes of R

Correct Answer: (B)

[EN] By definition, a Super Key uniquely identifies every attribute in the tuple, so X+ must cover the entire schema R.

[HI] परिभाषा के अनुसार सुपर की पूरी पंक्ति की पहचान करती है, इसलिए X+ का मान पूरे रिलेशन R के सभी कॉलम्स के बराबर होना जरूरी है।

Q17. Within Closure of Functional Dependencies and Attribute Closure (X+), which closure / key concept directly maps to: "Maximal set of attributes functionally determined by X under F"?

(Closure of Functional Dependencies and Attribute Closure (X+) में कौन सा Closure / Key Concept सीधे "Maximal set of attributes functionally determined by X under F" से संबंधित है?)

(A) FD Closure (F+)

(B) Attribute Closure (X+)

(C) FD Equivalence (F ≡ G)

(D) Essential CK Attributes

Correct Answer: (B)

[EN] In Closure of Functional Dependencies and Attribute Closure (X+), 'Attribute Closure (X+)' handles 'Maximal set of attributes functionally determined by X under F' (Computed in polynomial time O(|F|*|R|)).

[HI] Closure of Functional Dependencies and Attribute Closure (X+) में 'Attribute Closure (X+)' का कार्य/विवरण 'Maximal set of attributes functionally determined by X under F' (Computed in polynomial time O(|F|*|R|)) है।

Q18. Which option accurately describes 'FD Closure (F+)' in Closure of Functional Dependencies and Attribute Closure (X+)?

(Closure of Functional Dependencies and Attribute Closure (X+) के संदर्भ में 'FD Closure (F+)' की सही विशेषता कौन सी है?)

(A) Attributes absent from EVERY RHS of FDs in F

(B) F+ = G+ (F covers G AND G covers F)

(C) Maximal set of attributes functionally determined by X under F

(D) Complete set of all FDs implied by F via Armstrong's Axioms

Correct Answer: (D)

[EN] 'FD Closure (F+)' provides 'Complete set of all FDs implied by F via Armstrong's Axioms' — key point: Exponential size in n attributes (up to O(2^(2n))).

[HI] 'FD Closure (F+)' का मुख्य विवरण 'Complete set of all FDs implied by F via Armstrong's Axioms' है (Exponential size in n attributes (up to O(2^(2n))))।

Q19. In Closure of Functional Dependencies and Attribute Closure (X+), identify the correct parameter for the specification: "Attributes absent from EVERY RHS of FDs in F".

(Closure of Functional Dependencies and Attribute Closure (X+) में "Attributes absent from EVERY RHS of FDs in F" विवरण किस विकल्प के लिए सही है?)

(A) Attribute Closure (X+)

(B) FD Equivalence (F ≡ G)

(C) FD Closure (F+)

(D) Essential CK Attributes

Correct Answer: (D)

[EN] 'Essential CK Attributes' corresponds to 'Attributes absent from EVERY RHS of FDs in F' (Mandatory members of EVERY Candidate Key).

[HI] 'Essential CK Attributes' का संबंध 'Attributes absent from EVERY RHS of FDs in F' (Mandatory members of EVERY Candidate Key) से है।

Q20. Considering Closure of Functional Dependencies and Attribute Closure (X+), what key behavior defines 'FD Equivalence (F ≡ G)'?

(Closure of Functional Dependencies and Attribute Closure (X+) में 'FD Equivalence (F ≡ G)' की मुख्य भूमिका या मान क्या है?)

(A) Attributes absent from EVERY RHS of FDs in F

(B) F+ = G+ (F covers G AND G covers F)

(C) Maximal set of attributes functionally determined by X under F

(D) Complete set of all FDs implied by F via Armstrong's Axioms

Correct Answer: (B)

[EN] 'FD Equivalence (F ≡ G)' represents 'F+ = G+ (F covers G AND G covers F)' (Verified using X+ checks without building F+).

[HI] 'FD Equivalence (F ≡ G)' का अर्थ/मान 'F+ = G+ (F covers G AND G covers F)' है (Verified using X+ checks without building F+)।

Closure of Functional Dependencies and Attribute Closure (X+) — Exam FAQs

Q1: How can I find ALL Candidate Keys quickly in an exam MCQ without checking all 2^n subsets?

परीक्षा के प्रश्न में बिना सभी 2^n उपसमुच्चय चेक किए जल्दी से सारी कैंडिडेट की कैसे खोजें?

[EN] First collect all attributes of R that NEVER appear on the RHS of any FD—those 'Essential' attributes must belong to every CK. Compute Essential+; if it equals R, stop immediately (that's the unique CK!). Otherwise add 1 attribute at a time from LHS attributes to Essential.

[HI] सबसे पहले वे कॉलम छांटें जो किसी भी FD के दाईं ओर (RHS) न आए हों—वे हर CK में पक्का होंगे। पहले उन्हीं का क्लोज़र निकालें; यदि पूरा R मिल जाए तो वही एकमात्र CK है, वरना एक-एक करके अन्य कॉलम मिलाकर जांचें।

Q2: Why do textbooks sometimes show Canonical Cover with combined RHS (e.g., A -> BC) vs singleton RHS (A -> B, A -> C)?

कैनोनिकल कवर में कहीं RHS एक साथ (A->BC) तो कहीं अलग (A->B, A->C) क्यों लिखा मिलता है?

[EN] By the Union/Decomposition equivalence they represent the exact same dependencies. Korth/Silberschatz groups identical LHS via Union (no duplicate LHS), whereas Navathe often leaves Minimal Cover with singleton RHS.

[HI] Union व Decomposition से दोनों का अर्थ समान है: कोर्थ की पुस्तक समान LHS वाली FDs को जोड़कर (A->BC) लिखती है, जबकि नवाथे की पुस्तक मिनिमल कवर में सिंगल RHS रखती है।

Q3: Can an attribute that appears ONLY on the RHS of FDs ever be part of a Candidate Key?

क्या कोई कॉलम जो FDs के केवल RHS में आता हो (LHS में कभी नहीं), किसी कैंडिडेट की का हिस्सा बन सकता है?

[EN] Never! Any minimal Candidate Key containing a strictly RHS-only attribute could drop that attribute and still determine the exact same closure via the FD that produces it.

[HI] कभी नहीं! यदि वह केवल RHS में आता है तो किसी अन्य कॉलम से वह वैसे भी निकल आएगा, इसलिए उसे कैंडिडेट की में रखना न्यूनतम (Minimal) नियम के विरुद्ध होगा।

Related Posts

  • Loading related posts...

Post a Comment

Search Topic Notes & 20 MCQs (Hindi / English)