Degree vs Cardinality of a Relation: Definitions and Examples Notes in Hindi & English : रिलेशन की डिग्री (कॉलम्स की संख्या) बनाम कार्डिनैलिटी (रोज़ की संख्या) और 20 महत्वपूर्ण MCQ प्रश्न (Rajasthan IT Exam)

Post a Comment

PGDCA, BCA, B-Tech, MCA, M-Tech, B.Sc computer science राजस्थान सूचना सहायक व कंप्यूटर शिक्षक विशेष नोट्स: इस अध्याय में हम Degree vs Cardinality of a Relation: Definitions and Examples (रिलेशन की डिग्री (कॉलम्स की संख्या) बनाम कार्डिनैलिटी (रोज़ की संख्या)) की संपूर्ण थ्योरी, मुख्य तकनीकी बिंदु, तुलनात्मक तालिका और विगत परीक्षाओं के पैटर्न पर आधारित 20 अति-महत्वपूर्ण बहुविकल्पीय प्रश्न (MCQs) विस्तृत हिंदी व अंग्रेजी व्याख्या सहित पढ़ेंगे।

Overview: In the Relational Model, the Degree (Arity) of a relation is the total number of attributes (columns) in its schema, whereas Cardinality is the total number of tuples (rows) currently present in its instance. Understanding how relational algebra operations (Cartesian product, joins, set operations) change degree and cardinality is vital for exam calculations.

अध्याय सार: रिलेशनल मॉडल में किसी रिलेशन की डिग्री (Degree / Arity) उसकी टेबल में मौजूद कुल कॉलम्स (Attributes) की संख्या होती है, जबकि कार्डिनैलिटी (Cardinality) उस समय टेबल में मौजूद कुल पंक्तियों (Tuples) की संख्या को कहते हैं। प्रतियोगी परीक्षाओं में कार्टेशियन प्रोडक्ट और जॉइन के बाद नई डिग्री व कार्डिनैलिटी की गणना के प्रश्न अक्सर पूछे जाते हैं।

Degree vs Cardinality of a Relation: Definitions and Examples: Detailed Notes & Architecture (रिलेशन की डिग्री (कॉलम्स की संख्या) बनाम कार्डिनैलिटी (रोज़ की संख्या))

1. Degree (Arity) of a Relation: Schema-Level Property (रिलेशन की डिग्री (Degree / Arity): स्कीमा स्तर का गुण)

[EN] The Degree (also called Arity) of a relation R(A1, A2, ..., An) is simply the count of attributes (columns) 'n' in its relation schema. Relations are classified by degree as Unary (degree 1), Binary (degree 2), Ternary (degree 3), or n-ary (degree n). Because degree belongs to the Relation Intension (Schema), it stays fixed during normal row insertions and deletions and changes only when DDL statements like ALTER TABLE ADD/DROP COLUMN execute.

[HI] किसी रिलेशन की डिग्री (या Arity) उसकी स्कीमा में परिभाषित कुल एट्रिब्यूट्स (कॉलम) की संख्या होती है। डिग्री 1 वाले रिलेशन को Unary, डिग्री 2 को Binary और डिग्री 3 को Ternary कहते हैं। चूंकि डिग्री टेबल के स्कीमा (Intension) का हिस्सा है, इसलिए नई पंक्तियाँ जोड़ने या हटाने (INSERT/DELETE) से डिग्री नहीं बदलती—यह केवल ALTER TABLE जैसे DDL बदलावों से ही बदलती है।

2. Cardinality of a Relation: Instance-Level Property (रिलेशन की कार्डिनैलिटी (Cardinality): इंस्टेंस स्तर का गुण)

[EN] The Cardinality of a relation instance r(R) is the total count of tuples (rows) currently stored in that table at a given point in time. Unlike degree, cardinality belongs to the Relation Extension (Instance) and fluctuates continuously with DML operations: an INSERT increases cardinality by 1, a DELETE reduces it, and an empty newly-created table has cardinality 0 (while its degree remains non-zero!).

[HI] किसी रिलेशन इंस्टेंस की कार्डिनैलिटी उस टेबल में किसी क्षण विशेष पर मौजूद कुल टपल्स (पंक्तियों) की संख्या को कहते हैं। डिग्री के विपरीत, कार्डिनैलिटी एक्सटेंशन (डेटा स्तर) का गुण है जो प्रत्येक INSERT व DELETE के साथ लगातार बदलती रहती है। किसी खाली टेबल की कार्डिनैलिटी 0 होती है, भले ही उसकी डिग्री (कॉलम्स की संख्या) 5 या 10 हो।

3. Effect of Cartesian Product & Union/Intersection on Degree & Cardinality (कार्टेशियन प्रोडक्ट और सेट ऑपरेशन्स का डिग्री व कार्डिनैलिटी पर प्रभाव)

[EN] Suppose Relation R has degree d1 and cardinality c1, and Relation S has degree d2 and cardinality c2. In the Cartesian Product (R × S), attributes are concatenated so Degree = d1 + d2, and every tuple of R pairs with every tuple of S so Cardinality = c1 × c2. For Union-Compatible operations (R ∪ S, R ∩ S, R − S), both relations must already share the exact same degree (d1 = d2), so the output degree remains d1, while output cardinality satisfies: Union ∈ [max(c1,c2), c1+c2], Intersection ∈ [0, min(c1,c2)], and Difference ∈ [0, c1].

[HI] यदि रिलेशन R की डिग्री d1 व कार्डिनैलिटी c1 हो तथा S की डिग्री d2 व कार्डिनैलिटी c2 हो, तो कार्टेशियन प्रोडक्ट (R × S) में नई डिग्री = d1 + d2 तथा नई कार्डिनैलिटी = c1 × c2 होती है। वहीं यूनियन, इंटरसेक्शन व अंतर जैसे सेट ऑपरेशन्स में दोनों टेबल्स की डिग्री समान (d1 = d2) होना आवश्यक है और परिणाम की डिग्री भी वही रहती है, जबकि कार्डिनैलिटी डेटा के मेल के आधार पर बदलती है।

4. Natural Join, Selection & Projection Formulas & Exam Traps (नेचुरल जॉइन, सेलेक्शन व प्रोजेक्शन के सूत्र एवं सावधानियां)

[EN] In a Natural Join (R ⋈ S) sharing k common attribute names, duplicate common columns collapse into one, making output Degree = d1 + d2 − k, while output Cardinality ranges from 0 up to c1 × c2 (or at most c1 if joining on a Foreign Key from R referencing a Primary Key in S). Selection (σ) filters rows: keeps Degree = d1 and reduces/preserves Cardinality ≤ c1. Projection (π) picks m columns and deduplicates: sets Degree = m and Cardinality ≤ c1.

[HI] यदि R और S में k कॉलम नाम एक जैसे हों, तो नेचुरल जॉइन (R ⋈ S) की डिग्री = d1 + d2 − k होती है और कार्डिनैलिटी 0 से c1 × c2 के बीच (फॉरेन की जॉइन में अधिकतम चाइल्ड पंक्तियों तक) रहती है। सेलेक्शन (σ) डिग्री को अपरिवर्तित रखते हुए कार्डिनैलिटी कम कर सकता है, जबकि प्रोजेक्शन (π) डिग्री को चुने गए कॉलमों तक सीमित करता है और डुप्लीकेट हटने से कार्डिनैलिटी घट सकती है।

Syntax, Formula & Technical Example (Degree vs Cardinality of a Relation: Definitions and Examples)

-- Example Relation: STUDENT(Roll_No, Name, Branch, Age)
-- Schema has 4 columns -> Degree = 4
-- Suppose 3 rows exist: (1,'Asha','CSE',20), (2,'Ravi','IT',21), (3,'Neha','CSE',19) -> Cardinality = 3

-- Query 1: Cartesian Product with COURSE(CID, Title) [Degree=2, Cardinality=5]
-- Result (STUDENT x COURSE): Degree = 4 + 2 = 6, Cardinality = 3 * 5 = 15

-- Query 2: SQL check for Degree vs Cardinality
SELECT COUNT(*) AS Cardinality FROM STUDENT;
SELECT COUNT(*) AS Degree FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'STUDENT';

Degree vs Cardinality of a Relation: Definitions and Examples Quick Reference & Comparison Table

Operation / Relation PropertyResulting Degree (Columns)Resulting Cardinality (Rows)
Single Empty Relation R(A1..An)n (remains positive non-zero)0 (no tuples inserted yet)
Cartesian Product (R × S)d1 + d2 (sum of attributes)c1 × c2 (product of row counts)
Natural Join (R ⋈ S, k common cols)d1 + d2 − k (shared cols merged)0 to c1 × c2 (c1 on valid FK->PK join)
Selection σ_p(R)d1 (all columns preserved)0 to c1 (rows matching predicate p)

Degree vs Cardinality of a Relation: Definitions and Examples Top 20 Bilingual MCQs with Answers

Q1. What does the 'Degree' (or Arity) of a relation measure in a relational database?

(रिलेशनल डेटाबेस में किसी रिलेशन की 'डिग्री' (Degree / Arity) क्या मापती है?)

(A) The number of candidate keys

(B) The maximum value stored in the primary key

(C) The total number of rows (tuples)

(D) The total number of attributes (columns) in the relation

Correct Answer: (D)

[EN] Degree counts columns (attributes) defined in the relation schema.

[HI] किसी रिलेशन या टेबल में मौजूद कुल एट्रिब्यूट्स (कॉलम्स) की संख्या को उसकी डिग्री कहते हैं।

Q2. What does the 'Cardinality' of a relation refer to?

(किसी रिलेशन की 'कार्डिनैलिटी' (Cardinality) का क्या तात्पर्य है?)

(A) The data type length of a VARCHAR field

(B) The number of columns in the schema

(C) The number of foreign keys pointing out of the table

(D) The current number of tuples (rows) stored in the relation

Correct Answer: (D)

[EN] Cardinality counts the actual rows (tuples) currently present in a table instance.

[HI] किसी समय विशेष पर टेबल में मौजूद कुल पंक्तियों (Tuples/Rows) की संख्या को कार्डिनैलिटी कहते हैं।

Q3. A table STUDENT has 6 columns and currently holds 120 student records. After 25 students graduate and are deleted, what are its new Degree and Cardinality?

(एक टेबल STUDENT में 6 कॉलम व 120 रिकॉर्ड हैं। यदि 25 रिकॉर्ड डिलीट कर दिए जाएं, तो नई डिग्री और कार्डिनैलिटी क्या होगी?)

(A) Degree = 95, Cardinality = 6

(B) Degree = 6, Cardinality = 95

(C) Degree = 6, Cardinality = 120

(D) Degree = 5, Cardinality = 95

Correct Answer: (B)

[EN] Deleting rows changes cardinality (120 − 25 = 95) while the column count (degree = 6) remains completely unchanged.

[HI] पंक्तियाँ हटाने से केवल कार्डिनैलिटी (120 - 25 = 95) घटती है; कॉलमों की संख्या अर्थात डिग्री (6) अपरिवर्तित रहती है।

Q4. If a newly created table has 8 columns and 0 rows inserted so far, what are its Degree and Cardinality?

(यदि किसी नई बनी टेबल में 8 कॉलम हों और अभी तक कोई भी रो न जोड़ी गई हो, तो उसकी डिग्री और कार्डिनैलिटी क्या होगी?)

(A) Degree = 0, Cardinality = 0

(B) Degree = 0, Cardinality = 8

(C) Degree = 8, Cardinality = 0

(D) Degree = 8, Cardinality = 8

Correct Answer: (C)

[EN] An empty table still has its 8 schema columns (Degree = 8) and zero tuples (Cardinality = 0).

[HI] खाली टेबल की डिग्री उसके कॉलमों की संख्या (8) होगी, जबकि पंक्तियाँ न होने से कार्डिनैलिटी 0 होगी।

Q5. Relation R has 4 attributes and 10 tuples; Relation S has 3 attributes and 5 tuples. What are the Degree and Cardinality of R × S (Cartesian Product)?

(रिलेशन R (डिग्री 4, कार्डिनैलिटी 10) और S (डिग्री 3, कार्डिनैलिटी 5) के कार्टेशियन प्रोडक्ट R × S की डिग्री व कार्डिनैलिटी क्या होगी?)

(A) Degree = 12, Cardinality = 15

(B) Degree = 7, Cardinality = 15

(C) Degree = 7, Cardinality = 50

(D) Degree = 12, Cardinality = 50

Correct Answer: (C)

[EN] In Cartesian product, degrees add (4 + 3 = 7) and cardinalities multiply (10 × 5 = 50).

[HI] कार्टेशियन प्रोडक्ट में डिग्रियाँ जुड़ती हैं (4 + 3 = 7) और कार्डिनैलिटी गुणा होती हैं (10 × 5 = 50)।

Q6. Relations R(A, B, C, D) and S(C, D, E) have 6 tuples and 4 tuples respectively. What is the Degree of their Natural Join (R ⋈ S)?

(रिलेशन R(A, B, C, D) और S(C, D, E) के नेचुरल जॉइन (R ⋈ S) की डिग्री कितनी होगी?)

(A) 4

(B) 7 (4 + 3)

(C) 5 (attributes A, B, C, D, E)

(D) 2 (only common attributes)

Correct Answer: (C)

[EN] R has degree 4, S has degree 3, and they share k = 2 common attributes (C, D); hence Degree = 4 + 3 − 2 = 5.

[HI] R की डिग्री 4, S की 3 और दोनों में 2 कॉलम (C, D) साझा हैं; अतः नेचुरल जॉइन की डिग्री 4 + 3 - 2 = 5 होगी।

Q7. Suppose Relation R has cardinality 10 and S has cardinality 6, and both are union-compatible with degree 4. What are the minimum and maximum possible cardinalities of R ∪ S (Union)?

(यदि समान डिग्री 4 वाले R (10 टपल) और S (6 टपल) का यूनियन (R ∪ S) निकाला जाए, तो परिणाम की न्यूनतम व अधिकतम कार्डिनैलिटी क्या हो सकती है?)

(A) Minimum = 0, Maximum = 60

(B) Minimum = 10, Maximum = 16

(C) Minimum = 6, Maximum = 10

(D) Minimum = 4, Maximum = 16

Correct Answer: (B)

[EN] Union eliminates duplicates: if S ⊆ R, size is max(10,6)=10; if R and S are disjoint, size is 10+6=16.

[HI] यदि S के सभी टपल R में पहले से हों तो न्यूनतम 10, और दोनों में कोई समान न हो तो अधिकतम 10+6 = 16 टपल होंगे।

Q8. Under the same setup (|R| = 10, |S| = 6, union-compatible), what is the possible cardinality range of Intersection (R ∩ S)?

(यदि |R| = 10 और |S| = 6 (यूनियन-कम्पैटिबल) हों, तो इंटरसेक्शन (R ∩ S) की कार्डिनैलिटी की संभावित सीमा क्या है?)

(A) 10 to 16

(B) 6 to 10

(C) 0 to 60

(D) 0 to 6 (0 to min(|R|, |S|))

Correct Answer: (D)

[EN] If R and S share no common tuples, intersection is 0; at most all 6 tuples of S match inside R.

[HI] कोई साझा टपल न होने पर 0, और छोटे रिलेशन S के सभी 6 टपल R में मिलने पर अधिकतम 6 हो सकती है।

Q9. Which SQL DDL command can alter the Degree of an existing table?

(निम्नलिखित में से कौन सी SQL कमांड किसी मौजूदा टेबल की डिग्री (Degree) को बदल सकती है?)

(A) DELETE FROM

(B) INSERT INTO

(C) ALTER TABLE ... ADD COLUMN / DROP COLUMN

(D) UPDATE ... SET

Correct Answer: (C)

[EN] Adding or dropping columns changes the schema attribute count, altering the table's degree.

[HI] ALTER TABLE द्वारा नया कॉलम जोड़ने या पुराना कॉलम हटाने से टेबल की डिग्री बदलती है।

Q10. Which SQL DML operation typically alters a table's Cardinality without changing its Degree?

(कौन सा SQL ऑपरेशन टेबल की डिग्री बदले बिना उसकी कार्डिनैलिटी को बदलता है?)

(A) INSERT or DELETE

(B) DROP TABLE

(C) ALTER TABLE ADD

(D) CREATE INDEX

Correct Answer: (A)

[EN] INSERT adds rows and DELETE removes rows, directly changing tuple count (cardinality) while leaving columns (degree) intact.

[HI] INSERT और DELETE कमांड्स पंक्तियों की संख्या (कार्डिनैलिटी) बदलती हैं, जबकि कॉलम्स (डिग्री) वही रहते हैं।

Q11. If a table has a Projection query π_Name,City(Employee) run on it where Employee has 8 columns and 100 rows, what is guaranteed about the result's Degree and Cardinality?

(8 कॉलम और 100 पंक्तियों वाली Employee टेबल पर प्रोजेक्शन π_Name,City(Employee) चलाने पर परिणाम की डिग्री व कार्डिनैलिटी के बारे में क्या निश्चित है?)

(A) Degree = 8, Cardinality = 100

(B) Degree = 2, Cardinality <= 100 (duplicates removed)

(C) Degree = 2, Cardinality > 100

(D) Degree = 6, Cardinality = 0

Correct Answer: (B)

[EN] Projecting 2 columns yields Degree = 2, and set-based deduplication ensures Cardinality <= 100.

[HI] 2 कॉलम चुनने से डिग्री 2 होगी, और डुप्लीकेट पंक्तियाँ हटने से कार्डिनैलिटी 100 या उससे कम (<= 100) रहेगी।

Q12. What is a relation of Degree 1 formally called?

(डिग्री 1 वाले रिलेशन को औपचारिक रूप से क्या कहा जाता है?)

(A) Unary relation

(B) Ternary relation

(C) Binary relation

(D) Null relation

Correct Answer: (A)

[EN] Degree 1 = Unary, Degree 2 = Binary, Degree 3 = Ternary.

[HI] 1 कॉलम वाले रिलेशन को Unary, 2 को Binary और 3 कॉलम वाले रिलेशन को Ternary रिलेशन कहते हैं।

Q13. Suppose Relation R(A, B) has 10 tuples and S(B, C) has 5 tuples, where R.B is a NOT NULL Foreign Key referencing Primary Key S.B. What will be the exact cardinality of Natural Join R ⋈ S?

(यदि R(A, B) में 10 टपल और S(B, C) में 5 टपल हों तथा R.B प्राइमरी की S.B को संदर्भित करने वाली NOT NULL फॉरेन की हो, तो नेचुरल जॉइन R ⋈ S की कार्डिनैलिटी क्या होगी?)

(A) 10 (every tuple in R matches exactly one tuple in S)

(B) 5

(C) 50 (10 × 5)

(D) 0

Correct Answer: (A)

[EN] Because R.B is NOT NULL and references unique PK S.B, every one of the 10 rows in R joins with precisely 1 row in S.

[HI] R.B में NULL नहीं है और वह S की अद्वितीय प्राइमरी की से जुड़ा है, इसलिए R की सभी 10 पंक्तियाँ S की ठीक 1-1 पंक्ति से जुड़कर 10 टपल देंगी।

Q14. What happens to the Degree of a relation when a Selection operation σ_{Salary > 50000}(Emp) is executed on a 7-column Emp table?

(7 कॉलम वाली Emp टेबल पर सेलेक्शन σ_{Salary > 50000}(Emp) चलाने पर डिग्री पर क्या असर पड़ेगा?)

(A) Degree increases by 1

(B) Degree remains unchanged at 7

(C) Degree becomes equal to matching row count

(D) Degree decreases to 1

Correct Answer: (B)

[EN] Selection filters rows horizontally and preserves all columns of the original schema.

[HI] सेलेक्शन केवल पंक्तियों को छांटता है और सभी 7 कॉलम ज्यों के त्यों बनाए रखता है, अतः डिग्री 7 ही रहती है।

Q15. Which property belongs strictly to the Relation Schema (Intension) rather than the Relation Instance (Extension)?

(निम्नलिखित में से कौन सा गुण रिलेशन इंस्टेंस (Extension) के बजाय रिलेशन स्कीमा (Intension) से संबंधित है?)

(A) Cardinality of the relation

(B) Actual current sum of a numeric column

(C) Degree of the relation

(D) Number of NULL cells currently stored

Correct Answer: (C)

[EN] Degree is determined by the static attribute definitions in the schema, whereas cardinality depends on dynamic row data.

[HI] डिग्री का निर्धारण स्कीमा में मौजूद कॉलम्स की संख्या से होता है, न कि वर्तमान डेटा (Extension) से।

Q16. Which statement about Degree and Cardinality is FALSE?

(रिलेशन की डिग्री और कार्डिनैलिटी के संदर्भ में कौन सा कथन असत्य (FALSE) है?)

(A) Degree is also known as the Arity of a relation

(B) Cardinality can be 0 for a valid existing table

(C) Cartesian product multiplies the cardinalities of the two relations

(D) In SQL, adding a new row via INSERT increases the table's Degree by 1

Correct Answer: (D)

[EN] INSERT adds a new tuple, increasing Cardinality by 1; Degree only counts columns and stays unchanged.

[HI] INSERT कमांड नई पंक्ति जोड़ती है जिससे कार्डिनैलिटी 1 बढ़ती है, डिग्री (कॉलम्स की संख्या) पर कोई फर्क नहीं पड़ता।

Q17. Within Degree vs Cardinality of a Relation: Definitions and Examples, which operation / relation property directly maps to: "n (remains positive non-zero)"?

(Degree vs Cardinality of a Relation: Definitions and Examples में कौन सा Operation / Relation Property सीधे "n (remains positive non-zero)" से संबंधित है?)

(A) Cartesian Product (R × S)

(B) Selection σ_p(R)

(C) Natural Join (R ⋈ S, k common cols)

(D) Single Empty Relation R(A1..An)

Correct Answer: (D)

[EN] In Degree vs Cardinality of a Relation: Definitions and Examples, 'Single Empty Relation R(A1..An)' handles 'n (remains positive non-zero)' (0 (no tuples inserted yet)).

[HI] Degree vs Cardinality of a Relation: Definitions and Examples में 'Single Empty Relation R(A1..An)' का कार्य/विवरण 'n (remains positive non-zero)' (0 (no tuples inserted yet)) है।

Q18. Which option accurately describes 'Cartesian Product (R × S)' in Degree vs Cardinality of a Relation: Definitions and Examples?

(Degree vs Cardinality of a Relation: Definitions and Examples के संदर्भ में 'Cartesian Product (R × S)' की सही विशेषता कौन सी है?)

(A) d1 + d2 − k (shared cols merged)

(B) n (remains positive non-zero)

(C) d1 + d2 (sum of attributes)

(D) d1 (all columns preserved)

Correct Answer: (C)

[EN] 'Cartesian Product (R × S)' provides 'd1 + d2 (sum of attributes)' — key point: c1 × c2 (product of row counts).

[HI] 'Cartesian Product (R × S)' का मुख्य विवरण 'd1 + d2 (sum of attributes)' है (c1 × c2 (product of row counts))।

Q19. In Degree vs Cardinality of a Relation: Definitions and Examples, identify the correct parameter for the specification: "d1 + d2 − k (shared cols merged)".

(Degree vs Cardinality of a Relation: Definitions and Examples में "d1 + d2 − k (shared cols merged)" विवरण किस विकल्प के लिए सही है?)

(A) Selection σ_p(R)

(B) Cartesian Product (R × S)

(C) Natural Join (R ⋈ S, k common cols)

(D) Single Empty Relation R(A1..An)

Correct Answer: (C)

[EN] 'Natural Join (R ⋈ S, k common cols)' corresponds to 'd1 + d2 − k (shared cols merged)' (0 to c1 × c2 (c1 on valid FK->PK join)).

[HI] 'Natural Join (R ⋈ S, k common cols)' का संबंध 'd1 + d2 − k (shared cols merged)' (0 to c1 × c2 (c1 on valid FK->PK join)) से है।

Q20. Considering Degree vs Cardinality of a Relation: Definitions and Examples, what key behavior defines 'Selection σ_p(R)'?

(Degree vs Cardinality of a Relation: Definitions and Examples में 'Selection σ_p(R)' की मुख्य भूमिका या मान क्या है?)

(A) d1 + d2 − k (shared cols merged)

(B) n (remains positive non-zero)

(C) d1 (all columns preserved)

(D) d1 + d2 (sum of attributes)

Correct Answer: (C)

[EN] 'Selection σ_p(R)' represents 'd1 (all columns preserved)' (0 to c1 (rows matching predicate p)).

[HI] 'Selection σ_p(R)' का अर्थ/मान 'd1 (all columns preserved)' है (0 to c1 (rows matching predicate p))।

Degree vs Cardinality of a Relation: Definitions and Examples — Exam FAQs

Q1: How can I avoid confusing Degree and Cardinality in exams?

परीक्षा में डिग्री (Degree) और कार्डिनैलिटी (Cardinality) के बीच भ्रम से कैसे बचें?

[EN] Remember 'C for Cardinality = Count of rows (Tuples)' or 'D for Degree = Divisions/Columns'. Alternatively, Degree describes table width (columns), and Cardinality describes table height (rows).

[HI] याद रखें: Degree = कॉलम्स (टेबल की चौड़ाई) और Cardinality = पंक्तियाँ/रोज़ (टेबल की लंबाई)।

Q2: Can the Degree of a valid relational table ever be 0?

क्या किसी वैध रिलेशनल टेबल की डिग्री कभी 0 हो सकती है?

[EN] No. In SQL and the Relational Model, every table must define at least one attribute (column), so minimum Degree is 1, whereas minimum Cardinality (empty table) is 0.

[HI] नहीं। किसी भी वैध टेबल में कम से कम 1 कॉलम होना अनिवार्य है, अतः न्यूनतम डिग्री 1 होती है जबकि खाली टेबल की कार्डिनैलिटी 0 हो सकती है।

Q3: Is the Cardinality of a Relation the same thing as an ER Relationship's Cardinality Ratio?

क्या किसी रिलेशन की कार्डिनैलिटी और ER डायग्राम का कार्डिनैलिटी अनुपात एक ही बात है?

[EN] No. Table Cardinality is a single integer counting rows in one table, whereas ER Cardinality Ratio (1:1, 1:N, M:N) describes how entities in two sets link together.

[HI] नहीं। टेबल कार्डिनैलिटी एक टेबल की कुल पंक्तियों की गिनती है, जबकि ER कार्डिनैलिटी अनुपात दो एंटिटी सेट्स के बीच जुड़ाव की सीमा (1:1, 1:N, M:N) बताता है।

Related Posts

  • Loading related posts...

Post a Comment

Search Topic Notes & 20 MCQs (Hindi / English)