PGDCA, BCA, B-Tech, MCA, M-Tech, B.Sc computer science राजस्थान सूचना सहायक व कंप्यूटर शिक्षक विशेष नोट्स: इस अध्याय में हम Relational Algebra: Fundamental Operations vs Derived Operations (रिलेशनल अलजेब्रा: मूलभूत ऑपरेशन्स बनाम व्युत्पन्न ऑपरेशन्स) की संपूर्ण थ्योरी, मुख्य तकनीकी बिंदु, तुलनात्मक तालिका और विगत परीक्षाओं के पैटर्न पर आधारित 20 अति-महत्वपूर्ण बहुविकल्पीय प्रश्न (MCQs) विस्तृत हिंदी व अंग्रेजी व्याख्या सहित पढ़ेंगे।
Overview: Relational Algebra is a procedural query language that takes one or two relations as input and produces a new relation (closure property). Its 6 fundamental (primitive) operations—Selection, Projection, Union, Set Difference, Cartesian Product, and Rename—can express every derived operation, including Intersection, Joins, and Division.
अध्याय सार: रिलेशनल अलजेब्रा (Relational Algebra) एक प्रोसीजरल क्वेरी भाषा है जो एक या दो रिलेशन्स पर कार्य कर सदैव एक नया रिलेशन लौटाती है। इसके 6 मूलभूत ऑपरेशन्स—सेलेक्शन (σ), प्रोजेक्शन (π), यूनियन (∪), सेट डिफरेंस (−), कार्टेशियन प्रोडक्ट (×) और रीनेम (ρ)—से इंटरसेक्शन, जॉइन और डिवीजन जैसे सभी व्युत्पन्न ऑपरेशन्स बनाए जा सकते हैं।
Relational Algebra: Fundamental Operations vs Derived Operations: Detailed Notes & Architecture (रिलेशनल अलजेब्रा: मूलभूत ऑपरेशन्स बनाम व्युत्पन्न ऑपरेशन्स)
1. Procedural Nature & the 6 Fundamental (Primitive) Operations (प्रोसीजरल प्रकृति एवं 6 मूलभूत (Fundamental) ऑपरेशन्स)
[EN] Unlike Relational Calculus (which is declarative/non-procedural), Relational Algebra is Procedural—the user specifies the exact sequence of operations required to compute the result. Five core operations suffice for basic relational algebra: Selection (σ, unary horizontal row filter), Projection (π, unary vertical column filter with automatic duplicate elimination), Union (∪, binary), Set Difference (−, binary), and Cartesian Product (×, binary). Adding Rename (ρ, unary) gives the standard 6 Fundamental Operations capable of expressing self-joins and disambiguating column names.
[HI] रिलेशनल कैलकुलस (डिक्लेरेटिव) के विपरीत, रिलेशनल अलजेब्रा एक प्रोसीजरल (Procedural) भाषा है जिसमें परिणाम निकालने की चरणबद्ध प्रक्रिया बतानी होती है। इसके 6 मूलभूत (Primitive) ऑपरेशन्स हैं: सेलेक्शन (σ - पंक्तियाँ छांटना), प्रोजेक्शन (π - कॉलम चुनना व डुप्लीकेट हटाना), यूनियन (∪), सेट डिफरेंस (−), कार्टेशियन प्रोडक्ट (×) और रीनेम (ρ)। कोई भी मूलभूत ऑपरेशन अन्य पाँच की सहायता से व्यक्त नहीं किया जा सकता।
2. Unary Operations: Selection (σ), Projection (π), Rename (ρ) (यूनरी ऑपरेशन्स: सेलेक्शन (σ), प्रोजेक्शन (π) और रीनेम (ρ))
[EN] Selection σ_p(R) picks all tuples from R satisfying predicate condition p (using =, ≠, <, >, AND ∧, OR ∨, NOT ¬); Selection is commutative: σ_p1(σ_p2(R)) = σ_p2(σ_p1(R)), preserves Degree, and limits Cardinality ≤ |R|. Projection π_L(R) selects attribute list L and automatically removes duplicate tuples (set semantics); unlike SQL SELECT without DISTINCT, pure Projection never returns duplicates and is NOT commutative unless the outer attribute list is a subset of the inner list. Rename ρ_S(A1..An)(R) renames relation R to S and/or its attributes.
[HI] सेलेक्शन σ_p(R) दी गई शर्त p पूरी करने वाली पंक्तियों को छांटता है; यह क्रमविनिमेय (Commutative) है और डिग्री नहीं बदलता। प्रोजेक्शन π_L(R) चुने हुए कॉलम निकालता है और सेट सिद्धांत के कारण स्वतः सभी डुप्लीकेट पंक्तियों को हटा देता है। रीनेम ρ किसी रिलेशन या उसके कॉलम्स को नया नाम देता है ताकि सेल्फ-जॉइन में नामों का टकराव न हो।
3. Derived Operations: Intersection (∩), Joins (⋈), Outer Joins (व्युत्पन्न ऑपरेशन्स: इंटरसेक्शन (∩), थीटा/नेचुरल जॉइन (⋈) एवं आउटर जॉइन)
[EN] Derived operations add convenience without extending expressive power because each reduces strictly to Fundamental operations: (1) Set Intersection: R ∩ S = R − (R − S); (2) Theta Join: R ⋈_θ S = σ_θ(R × S) (Equijoin when θ uses only equality '='); (3) Natural Join: R ⋈ S combines R and S by equating all identically named attributes and projecting away duplicate common columns via π(σ(R × S)). Outer Joins (Left ⟕, Right ⟖, Full ⟗) preserve unmatched tuples padded with NULLs.
[HI] व्युत्पन्न (Derived) ऑपरेशन्स मूलभूत ऑपरेशन्स से ही व्युत्पन्न होते हैं और क्वेरी लिखना आसान बनाते हैं: इंटरसेक्शन R ∩ S को R − (R − S) से लिखा जाता है; थीटा जॉइन R ⋈_θ S को σ_θ(R × S) से बनाया जाता है; और नेचुरल जॉइन समान नाम वाले कॉलमों को बराबर कर डुप्लीकेट कॉलम हटा देता है। आउटर जॉइन बेमेल पंक्तियों को NULL के साथ सुरक्षित रखते हैं।
4. Division Operator (÷) for Universal Quantification ('For All') (डिवीजन ऑपरेटर (÷): 'सभी (For All)' प्रकार की क्वेरी हेतु)
[EN] Division R(A, B) ÷ S(B) answers universal-quantification queries such as 'Find students who enrolled in EVERY course listed in S'. Formally, tuple t[A] appears in R ÷ S if and only if for every tuple s ∈ S, (t[A], s[B]) exists in R. Division is a Derived Operation written using π, ×, and − as: π_A(R) − π_A((π_A(R) × S) − R). Notice that Division first computes all candidate A-values, builds every ideal (A, B) pair via Cartesian product, subtracts actual R rows to spot disqualified A-values missing some B, and subtracts those failures from all A-values!
[HI] डिवीजन ऑपरेटर (÷) का उपयोग 'सभी के लिए (For All)' वाली क्वेरी—जैसे 'उन छात्रों को खोजें जिन्होंने S में मौजूद सभी कोर्स लिए हों'—को हल करने में होता है। इसे मूलभूत ऑपरेशन्स π, × और − से इस प्रकार बनाया जाता है: π_A(R) − π_A((π_A(R) × S) − R)। यह पहले संभावित अयोग्य टपल्स (जिन्होंने कोई कोर्स छोड़ा) को निकालता है और फिर कुल सूची में से उन्हें घटा देता है।
Syntax, Formula & Technical Example (Relational Algebra: Fundamental Operations vs Derived Operations)
-- Derived Operations expressed strictly via the 6 Fundamental Operations:
-- 1. Intersection: R ∩ S = R - (R - S)
-- 2. Theta Join: R ⋈_θ S = σ_θ(R × S)
-- 3. Natural Join: R(A,B) ⋈ S(B,C) = π_{A, R.B, C}( σ_{R.B = S.B}(R × S) )
-- 4. Division R(A,B) ÷ S(B):
-- Temp1 = π_A(R)
-- Temp2 = π_A((Temp1 × S) - R) -- A-values missing at least one B from S
-- Result = Temp1 - Temp2
Relational Algebra: Fundamental Operations vs Derived Operations Quick Reference & Comparison Table
| Relational Algebra Operator | Classification & Algebraic Spec | Key Exam Property |
|---|---|---|
| Selection (σ_p) & Projection (π_L) | Fundamental Unary Operators (Row & Column Filtering) | σ is commutative; π eliminates duplicate rows |
| Union (∪), Difference (−), Product (×) | Fundamental Binary Set & Cross-Product Operators | ∪ and − require union compatibility; × pairs all rows |
| Intersection (∩) | Derived Binary Set Operator: R − (R − S) | Requires union compatibility; returns common tuples |
| Natural Join (⋈) & Division (÷) | Derived Binary Join (π(σ(×))) & Quotient (π, ×, −) | ⋈ merges common cols; ÷ solves 'FOR ALL' queries |
Relational Algebra: Fundamental Operations vs Derived Operations Top 20 Bilingual MCQs with Answers
Q1. What type of query language is Relational Algebra?
(रिलेशनल अलजेब्रा किस प्रकार की क्वेरी भाषा है?)
(A) Non-procedural / declarative query language
(B) Imperative memory-pointer machine language
(C) Markup styling language
(D) Procedural query language (specifies step-by-step operations to compute results)
Correct Answer: (D)
[EN] Relational Algebra is procedural (how to retrieve), whereas Tuple/Domain Relational Calculus and SQL are declarative (what to retrieve).
[HI] रिलेशनल अलजेब्रा एक प्रोसीजरल (Procedural) भाषा है जिसमें परिणाम प्राप्त करने के चरण क्रम से लिखे जाते हैं।
Q2. Which set lists ALL 6 Fundamental (Primitive) operations of Relational Algebra?
(निम्नलिखित में से कौन सा विकल्प रिलेशनल अलजेब्रा के सभी 6 मूलभूत (Fundamental) ऑपरेशन्स की सही सूची है?)
(A) Selection (σ), Projection (π), Union (∪), Set Difference (−), Cartesian Product (×), Rename (ρ)
(B) Join, Outer Join, Intersection, Union, Difference, Divide
(C) Selection, Projection, Intersection, Join, Division, Union
(D) Selection, Projection, Natural Join, Theta Join, Union, Rename
Correct Answer: (A)
[EN] Intersection, Joins, and Division are derived; the 6 primitives are σ, π, ∪, −, ×, and ρ.
[HI] सेलेक्शन, प्रोजेक्शन, यूनियन, सेट डिफरेंस, कार्टेशियन प्रोडक्ट और रीनेम ही 6 मूलभूत ऑपरेशन्स हैं।
Q3. How can Set Intersection (R ∩ S) be expressed purely using Fundamental operations?
(सेट इंटरसेक्शन (R ∩ S) को केवल मूलभूत ऑपरेशन्स की सहायता से कैसे लिखा जाता है?)
(A) σ_{R=S}(R ∪ S)
(B) (R × S) − R
(C) R ∪ (R − S)
(D) R − (R − S)
Correct Answer: (D)
[EN] R − S removes tuples shared with S; subtracting that remainder from R leaves strictly the shared tuples R ∩ S.
[HI] R में से (R − S) घटाने पर केवल वही टपल बचते हैं जो R और S दोनों में समान थे, अर्थात R ∩ S।
Q4. Which Derived Relational Algebra operation corresponds directly to σ_θ(R × S)?
(व्युत्पन्न ऑपरेशन σ_θ(R × S) निम्नलिखित में से किसके समतुल्य है?)
(A) Division (R ÷ S)
(B) Theta Join (R ⋈_θ S)
(C) Set Intersection (R ∩ S)
(D) Union (R ∪ S)
Correct Answer: (B)
[EN] Theta Join is defined directly as a Cartesian Product followed by a Selection under join predicate θ.
[HI] कार्टेशियन प्रोडक्ट पर शर्त θ के साथ सेलेक्शन लगाना ही थीटा जॉइन (R ⋈_θ S) कहलाता है।
Q5. Which Relational Algebra operator automatically eliminates duplicate tuples in its output without needing a separate keyword?
(कौन सा रिलेशनल अलजेब्रा ऑपरेटर अपने परिणाम से डुप्लीकेट टपल्स को स्वतः हटा देता है?)
(A) Only SQL SELECT without DISTINCT
(B) Theta Join preserves duplicate columns without deduplicating
(C) Selection duplicates matching rows
(D) Projection (π) — and every set-based RA operator obeys set semantics
Correct Answer: (D)
[EN] Pure Relational Algebra operates on sets, and Projection (π) explicitly removes duplicate rows generated when dropping unique keys.
[HI] शुद्ध रिलेशनल अलजेब्रा में प्रोजेक्शन (π) कॉलम चुनते समय बनने वाली सभी डुप्लीकेट पंक्तियों को स्वतः हटा देता है।
Q6. Which pair of operators requires 'Union Compatibility' (same degree and compatible attribute domains) as a precondition?
(निम्नलिखित में से किन ऑपरेशन्स के लिए दोनों रिलेशन्स का 'यूनियन कम्पैटिबल' (समान डिग्री व संगत डोमेन) होना अनिवार्य है?)
(A) Division (÷) and Theta Join
(B) Cartesian Product (×) and Natural Join (⋈)
(C) Selection (σ) and Rename (ρ)
(D) Union (∪), Set Difference (−), and Intersection (∩)
Correct Answer: (D)
[EN] Binary set operations ∪, −, and ∩ require matching column counts and domain types across both relations.
[HI] यूनियन (∪), सेट डिफरेंस (−) और इंटरसेक्शन (∩) के लिए दोनों टेबल्स की डिग्री समान व डोमेन संगत होने जरूरी हैं।
Q7. What does the Closure Property of Relational Algebra signify?
(रिलेशनल अलजेब्रा में 'क्लोज़र गुण' (Closure Property) का क्या अर्थ है?)
(A) Attributes cannot be renamed
(B) Every database closes automatically after one query
(C) The output of every Relational Algebra operation is always another Relation, allowing nested queries
(D) No two relations can ever be joined
Correct Answer: (C)
[EN] Because input and output are both relations, expressions can be arbitrarily composed and nested.
[HI] प्रत्येक ऑपरेशन का परिणाम भी एक रिलेशन ही होता है, जिससे जटिल नेस्टेड क्वेरीज़ बनाना संभव होता है।
Q8. Which derived operator is specifically designed to answer universal quantification queries such as 'Find suppliers who supply EVERY red part'?
('उन सप्लायर्स को खोजें जो सभी लाल पुर्जों की आपूर्ति करते हैं'—ऐसी 'For All' क्वेरी के लिए कौन सा व्युत्पन्न ऑपरेटर प्रयुक्त होता है?)
(A) Set Difference (−)
(B) Left Outer Join (⟕)
(C) Cartesian Product (×)
(D) Division (÷)
Correct Answer: (D)
[EN] Division R(Supplier, Part) ÷ S(Red_Part) retrieves suppliers paired with all parts listed in S.
[HI] डिवीजन ऑपरेटर (÷) 'सभी से संबंधित (For All)' वाली क्वेरीज़ को सीधे हल करने के लिए बनाया गया है।
Q9. Which fundamental operations are required to construct the Division operator R ÷ S?
(डिवीजन ऑपरेटर (R ÷ S) को निर्मित करने के लिए किन मूलभूत ऑपरेशन्स की आवश्यकता होती है?)
(A) Outer Join and Aggregation
(B) Projection (π), Cartesian Product (×), and Set Difference (−)
(C) Union (∪) and Intersection (∩) only
(D) Selection (σ) and Rename (ρ) only
Correct Answer: (B)
[EN] Division formula π_A(R) − π_A((π_A(R) × S) − R) uses only π, ×, and −.
[HI] डिवीजन का सूत्र π_A(R) − π_A((π_A(R) × S) − R) केवल π, × और − से बनता है।
Q10. For relations R and S, which fundamental operation is NOT Commutative (i.e., order matters: R op S ≠ S op R)?
(निम्नलिखित में से कौन सा मूलभूत ऑपरेशन क्रमविनिमेय (Commutative) नहीं है?)
(A) Intersection: R ∩ S = S ∩ R
(B) Union: R ∪ S = S ∪ R
(C) Set Difference: R − S ≠ S − R
(D) Natural Join: R ⋈ S = S ⋈ R
Correct Answer: (C)
[EN] Tuples in R but not S differ completely from tuples in S but not R.
[HI] सेट डिफरेंस (R − S) क्रमविनिमेय नहीं है, क्योंकि R में से S घटाने और S में से R घटाने के परिणाम भिन्न होते हैं।
Q11. When is Selection commutative with Projection: σ_p(π_L(R)) = π_L(σ_p(R))?
(सेलेक्शन और प्रोजेक्शन कब क्रमविनिमेय (σ_p(π_L(R)) = π_L(σ_p(R))) होते हैं?)
(A) Only when all attributes referenced in selection predicate p are included inside projection list L
(B) Always true for any p and L
(C) Never true under any circumstance
(D) Only when R is empty
Correct Answer: (A)
[EN] If p filters on attribute Salary, you cannot project away Salary before running σ_p.
[HI] जब सेलेक्शन की शर्त p में प्रयुक्त सभी एट्रिब्यूट्स प्रोजेक्शन सूची L में मौजूद हों, तभी दोनों का क्रम बदला जा सकता है।
Q12. Which Relational Algebra operator matches R ⋈ S when R and S have NO common attribute names at all?
(यदि R और S के बीच एक भी कॉलम नाम समान न हो, तो नेचुरल जॉइन (R ⋈ S) किसके समतुल्य हो जाता है?)
(A) Empty relation ∅
(B) Cartesian Product (R × S)
(C) Set Difference (R − S)
(D) Union (R ∪ S)
Correct Answer: (B)
[EN] With zero common attributes to equate, Natural Join pairs every tuple of R with every tuple of S, collapsing into R × S.
[HI] समान नाम वाला कोई कॉलम न होने पर नेचुरल जॉइन बिना किसी शर्त के दोनों टेबल्स का कार्टेशियन प्रोडक्ट (R × S) बन जाता है।
Q13. What does the Rename operator ρ_NewName(A1, A2)(R) primarily enable in Relational Algebra?
(रीनेम ऑपरेटर (ρ) का रिलेशनल अलजेब्रा में मुख्य उपयोग क्या है?)
(A) Resolving attribute name collisions and enabling Self-Joins (joining a relation with itself)
(B) Enforcing Primary Key NOT NULL checks
(C) Deleting rows permanently from disk
(D) Sorting tuples in ascending order
Correct Answer: (A)
[EN] Joining Employee with itself (Employee × Employee) requires ρ to rename one copy so Supervisor and Subordinate IDs can be compared.
[HI] टेबल या कॉलम्स के नाम बदलकर नामों के टकराव से बचने और एक ही टेबल का स्वयं से जॉइन (Self-Join) करने के लिए ρ प्रयुक्त होता है।
Q14. What is the difference between Equijoin and Natural Join?
(इक्वीजॉइन (Equijoin) और नेचुरल जॉइन (Natural Join) के बीच क्या मुख्य अंतर है?)
(A) Natural Join requires union compatibility
(B) Equijoin uses '<' while Natural Join uses '>'
(C) Equijoin cannot be derived from Cartesian Product
(D) Equijoin keeps both duplicate join columns in output; Natural Join automatically merges/removes duplicate common columns and equates all shared attribute names
Correct Answer: (D)
[EN] Equijoin is a Theta Join using '=' that retains R.B and S.B separately, whereas Natural Join merges shared columns via π.
[HI] इक्वीजॉइन में दोनों टेबल्स के समान कॉलम परिणाम में अलग-अलग बने रहते हैं, जबकि नेचुरल जॉइन समान नाम वाले कॉलम्स की दोहरी कॉपी हटा देता है।
Q15. Which statement correctly contrasts Selection (σ) and Projection (π)?
(सेलेक्शन (σ) और प्रोजेक्शन (π) की सही तुलना किस विकल्प में की गई है?)
(A) Selection slices a table horizontally (filters rows); Projection slices a table vertically (filters columns)
(B) Selection removes duplicates; Projection preserves duplicates
(C) Selection filters columns; Projection filters rows
(D) Both filter rows only
Correct Answer: (A)
[EN] Selection acts on rows via boolean predicates; Projection picks column subsets and deduplicates.
[HI] सेलेक्शन पंक्तियों (क्षैतिज) को छांटता है जबकि प्रोजेक्शन कॉलम्स (ऊर्ध्वाधर) को चुनता है।
Q16. Which statement about Fundamental vs Derived Relational Algebra operations is FALSE?
(मूलभूत बनाम व्युत्पन्न रिलेशनल अलजेब्रा ऑपरेशन्स के बारे में कौन सा कथन असत्य (FALSE) है?)
(A) Division (÷) can be expressed entirely using π, ×, and −
(B) Cartesian Product (×) is a Binary Fundamental operation
(C) Natural Join (⋈) and Intersection (∩) are Fundamental operations that cannot be derived from other operators
(D) Selection (σ) and Projection (π) are Unary Fundamental operations
Correct Answer: (C)
[EN] Both Natural Join and Intersection are Derived operations (expressed via π, σ, × and − respectively).
[HI] नेचुरल जॉइन और इंटरसेक्शन मूलभूत नहीं बल्कि व्युत्पन्न ऑपरेशन्स हैं जिन्हें अन्य मूलभूत ऑपरेशन्स से बनाया जा सकता है।
Q17. Within Relational Algebra: Fundamental Operations vs Derived Operations, which relational algebra operator directly maps to: "Fundamental Unary Operators (Row & Column Filtering)"?
(Relational Algebra: Fundamental Operations vs Derived Operations में कौन सा Relational Algebra Operator सीधे "Fundamental Unary Operators (Row & Column Filtering)" से संबंधित है?)
(A) Natural Join (⋈) & Division (÷)
(B) Union (∪), Difference (−), Product (×)
(C) Intersection (∩)
(D) Selection (σ_p) & Projection (π_L)
Correct Answer: (D)
[EN] In Relational Algebra: Fundamental Operations vs Derived Operations, 'Selection (σ_p) & Projection (π_L)' handles 'Fundamental Unary Operators (Row & Column Filtering)' (σ is commutative; π eliminates duplicate rows).
[HI] Relational Algebra: Fundamental Operations vs Derived Operations में 'Selection (σ_p) & Projection (π_L)' का कार्य/विवरण 'Fundamental Unary Operators (Row & Column Filtering)' (σ is commutative; π eliminates duplicate rows) है।
Q18. Which option accurately describes 'Union (∪), Difference (−), Product (×)' in Relational Algebra: Fundamental Operations vs Derived Operations?
(Relational Algebra: Fundamental Operations vs Derived Operations के संदर्भ में 'Union (∪), Difference (−), Product (×)' की सही विशेषता कौन सी है?)
(A) Derived Binary Join (π(σ(×))) & Quotient (π, ×, −)
(B) Fundamental Binary Set & Cross-Product Operators
(C) Derived Binary Set Operator: R − (R − S)
(D) Fundamental Unary Operators (Row & Column Filtering)
Correct Answer: (B)
[EN] 'Union (∪), Difference (−), Product (×)' provides 'Fundamental Binary Set & Cross-Product Operators' — key point: ∪ and − require union compatibility; × pairs all rows.
[HI] 'Union (∪), Difference (−), Product (×)' का मुख्य विवरण 'Fundamental Binary Set & Cross-Product Operators' है (∪ and − require union compatibility; × pairs all rows)।
Q19. In Relational Algebra: Fundamental Operations vs Derived Operations, identify the correct parameter for the specification: "Derived Binary Set Operator: R − (R − S)".
(Relational Algebra: Fundamental Operations vs Derived Operations में "Derived Binary Set Operator: R − (R − S)" विवरण किस विकल्प के लिए सही है?)
(A) Natural Join (⋈) & Division (÷)
(B) Union (∪), Difference (−), Product (×)
(C) Intersection (∩)
(D) Selection (σ_p) & Projection (π_L)
Correct Answer: (C)
[EN] 'Intersection (∩)' corresponds to 'Derived Binary Set Operator: R − (R − S)' (Requires union compatibility; returns common tuples).
[HI] 'Intersection (∩)' का संबंध 'Derived Binary Set Operator: R − (R − S)' (Requires union compatibility; returns common tuples) से है।
Q20. Considering Relational Algebra: Fundamental Operations vs Derived Operations, what key behavior defines 'Natural Join (⋈) & Division (÷)'?
(Relational Algebra: Fundamental Operations vs Derived Operations में 'Natural Join (⋈) & Division (÷)' की मुख्य भूमिका या मान क्या है?)
(A) Derived Binary Set Operator: R − (R − S)
(B) Derived Binary Join (π(σ(×))) & Quotient (π, ×, −)
(C) Fundamental Unary Operators (Row & Column Filtering)
(D) Fundamental Binary Set & Cross-Product Operators
Correct Answer: (B)
[EN] 'Natural Join (⋈) & Division (÷)' represents 'Derived Binary Join (π(σ(×))) & Quotient (π, ×, −)' (⋈ merges common cols; ÷ solves 'FOR ALL' queries).
[HI] 'Natural Join (⋈) & Division (÷)' का अर्थ/मान 'Derived Binary Join (π(σ(×))) & Quotient (π, ×, −)' है (⋈ merges common cols; ÷ solves 'FOR ALL' queries)।
Relational Algebra: Fundamental Operations vs Derived Operations — Exam FAQs
Q1: Why do some books list 5 Fundamental operations while others list 6?
कुछ किताबों में 5 मूलभूत ऑपरेशन्स और कुछ में 6 क्यों बताए जाते हैं?
[EN] The 5 core operations (σ, π, ∪, −, ×) generate all queries over distinct tables, while Rename (ρ) is added as the 6th primitive specifically to make self-joins and attribute renaming algebraically complete.
[HI] 5 मुख्य ऑपरेशन्स (σ, π, ∪, −, ×) सभी सामान्य क्वेरीज़ हल कर देते हैं; सेल्फ-जॉइन और कॉलम नाम परिवर्तन को औपचारिक पूर्णता देने के लिए रीनेम (ρ) को 6वें मूलभूत ऑपरेशन के रूप में जोड़ा जाता है।
Q2: Does Projection (π) in Relational Algebra behave identically to SQL SELECT?
क्या रिलेशनल अलजेब्रा का प्रोजेक्शन (π) और SQL का SELECT बिल्कुल एक जैसा व्यवहार करते हैं?
[EN] Not quite! Pure Relational Algebra π automatically eliminates duplicate rows (Set semantics), whereas SQL SELECT keeps duplicates unless you explicitly write SELECT DISTINCT.
[HI] बिल्कुल नहीं! रिलेशनल अलजेब्रा का π स्वतः सभी डुप्लीकेट पंक्तियों को हटा देता है, जबकि SQL SELECT डुप्लीकेट पंक्तियाँ बनाए रखता है जब तक आप DISTINCT न लिखें।
Q3: What happens if you apply Division R(A, B) ÷ S(B) when S is empty?
यदि विभाजक रिलेशन S खाली (0 टपल) हो, तो R ÷ S का क्या परिणाम आता है?
[EN] Under the formal definition π_A(R) − π_A((π_A(R) × S) − R), since S is empty, (π_A(R) × ∅) is empty, so nothing is subtracted and it returns all distinct A-values in R (vacuously true for all 0 elements of S).
[HI] औपचारिक सूत्र में S खाली होने पर कार्टेशियन प्रोडक्ट शून्य हो जाता है, जिससे कोई भी मान नहीं घटता और R के सभी अद्वितीय A मान परिणाम में आ जाते हैं।
Post a Comment
Post a Comment