PGDCA, BCA, B-Tech, MCA, M-Tech, B.Sc computer science राजस्थान सूचना सहायक व कंप्यूटर शिक्षक विशेष नोट्स: इस अध्याय में हम Cardinality Ratios in Relationships: 1:1, 1:N, N:1, M:N (कार्डिनैलिटी अनुपात (Cardinality): 1:1, 1:N, N:1, M:N संबंधों के नियम) की संपूर्ण थ्योरी, मुख्य तकनीकी बिंदु, तुलनात्मक तालिका और विगत परीक्षाओं के पैटर्न पर आधारित 20 अति-महत्वपूर्ण बहुविकल्पीय प्रश्न (MCQs) विस्तृत हिंदी व अंग्रेजी व्याख्या सहित पढ़ेंगे।
Overview: Cardinality ratios (1:1, 1:N, N:1, M:N) define the maximum number of relationship instances in which an entity can participate within an ER model. These ratios directly dictate where foreign keys are placed or whether a separate junction table is required during relational schema mapping.
अध्याय सार: कार्डिनैलिटी अनुपात (1:1, 1:N, N:1, M:N) यह निर्धारित करता है कि एक एंटिटी सेट की कोई एंटिटी किसी रिलेशनशिप के माध्यम से अधिकतम कितनी अन्य एंटिटीज़ से जुड़ सकती है। डेटाबेस डिज़ाइन में फॉरेन की का स्थान और अतिरिक्त टेबल बनने का निर्णय इसी अनुपात पर आधारित होता है।
Cardinality Ratios in Relationships: 1:1, 1:N, N:1, M:N: Detailed Notes & Architecture (कार्डिनैलिटी अनुपात (Cardinality): 1:1, 1:N, N:1, M:N संबंधों के नियम)
1. One-to-One (1:1) & One-to-Many (1:N) Relationships (एक-से-एक (1:1) और एक-से-अनेक (1:N) संबंध)
[EN] In a 1:1 relationship, an entity in set A is associated with at most one entity in set B, and an entity in B is associated with at most one entity in A—for example, one Department is managed by one Manager. In a 1:N relationship, one entity in A can link to zero, one, or many entities in B, whereas each entity in B links to at most one entity in A (e.g., one Department employs many Employees). During SQL mapping, 1:N always places the primary key of the 1-side as a foreign key on the N-side table.
[HI] 1:1 संबंध में सेट A की एक एंटिटी सेट B की अधिकतम एक ही एंटिटी से जुड़ती है और विपरीत क्रम में भी यही लागू होता है, जैसे एक नागरिक का एक पासपोर्ट। 1:N संबंध में एक विभाग (Department) में अनेक कर्मचारी (Employees) काम कर सकते हैं, परंतु प्रत्येक कर्मचारी अधिकतम एक ही विभाग से जुड़ा होता है। रिलेशनल मॉडल में 1:N के दौरान हमेशा '1-साइड' की प्राइमरी की को 'N-साइड' की टेबल में फॉरेन की के रूप में रखा जाता है।
2. Many-to-One (N:1) & Many-to-Many (M:N) Relationships (अनेक-से-एक (N:1) और अनेक-से-अनेक (M:N) संबंध)
[EN] N:1 is simply the directional inverse of 1:N when read from the child entity toward the parent entity, such as many Employees working for one Department. In an M:N relationship, an entity in A associates with any number of entities in B, and each entity in B also associates with any number of entities in A (e.g., Students enrolling in Courses). Because neither table can hold multiple foreign key values atomically without violating First Normal Form, M:N always requires a separate associative (junction) table.
[HI] N:1 केवल 1:N को विपरीत दिशा से पढ़ने का रूप है, जैसे अनेक छात्र एक ही कॉलेज में पढ़ते हैं। M:N (अनेक-से-अनेक) संबंध में दोनों ओर से अनेक एंटिटीज़ आपस में जुड़ सकती हैं, जैसे एक छात्र कई कोर्स ले सकता है और एक कोर्स में कई छात्र हो सकते हैं। चूंकि एक कॉलम में एकाधिक मान रखना 1NF के विरुद्ध है, इसलिए M:N संबंध के लिए सदैव एक तीसरी मध्यवर्ती (Junction/Associative) टेबल बनाई जाती है।
3. ER Diagram Notations: Chen, Korth Arrow & Crow's Foot (ER डायग्राम संकेतन: चेन, कोर्थ एरो एवं क्रोज़ फुट)
[EN] In Chen's notation, labels '1', 'N', and 'M' are written directly on the lines connecting entity rectangles to the relationship diamond. Conversely, Korth (Silberschatz) uses a directed arrow (->) pointing toward an entity set to denote 'at most one' (cardinality 1) and an undirected straight line (—) to denote 'many'. In industry Crow's Foot notation, a single vertical bar (|) indicates 'one' while a three-pronged fork (<) indicates 'many'.
[HI] चेन (Chen) नोटेशन में एंटिटी और डायमंड को जोड़ने वाली रेखाओं पर सीधे '1', 'N' या 'M' लिखा जाता है। वहीं कोर्थ (Korth) पुस्तक की शैली में जिस एंटिटी की ओर तीर (Arrow ->) जाता है उसकी कार्डिनैलिटी 'अधिकतम एक' (1) मानी जाती है और बिना तीर की सीधी रेखा 'अनेक' (Many) दर्शाती है। आधुनिक Crow's Foot नोटेशन में सीधी खड़ी रेखा (|) एक और तीन शाखाओं वाला चिह्न (<) अनेक को प्रदर्शित करता है।
4. Min-Max Notation & Foreign Key Placement Rules (मिन-मैक्स (Min-Max) संकेतन और फॉरेन की नियम)
[EN] Elmasri and Navathe express structural constraints using (min, max) pairs next to each entity; here, max represents the cardinality upper bound (1 or N/M). Note a common exam trap: in (min, max) notation, the label sits adjacent to the participating entity itself rather than across the diamond, which is the reverse of Chen's placement. For 1:1 relations in SQL, placing a UNIQUE constraint on the foreign key guarantees that no two rows reference the same target entity.
[HI] Elmasri व Navathe के (min, max) नोटेशन में प्रत्येक एंटिटी के पास (न्यूनतम, अधिकतम) भागीदारी जोड़ी जाती है, जहाँ अधिकतम मान कार्डिनैलिटी अनुपात (1 या N) बताता है। परीक्षाओं में ध्यान रखें कि चेन नोटेशन में अनुपात विपरीत एंटिटी की ओर लिखा जाता है जबकि (min, max) मान उसी एंटिटी के ठीक बगल में लिखा जाता है। SQL में 1:1 संबंध लागू करने के लिए फॉरेन की कॉलम पर UNIQUE प्रतिबंध लगाना आवश्यक होता है।
Syntax, Formula & Technical Example (Cardinality Ratios in Relationships: 1:1, 1:N, N:1, M:N)
-- 1:1 Relationship (UNIQUE Foreign Key enforces at-most-one)
CREATE TABLE Passport (Passport_No VARCHAR(12) PRIMARY KEY, Citizen_ID INT UNIQUE REFERENCES Citizen(ID));
-- 1:N / N:1 Relationship (FK placed on the N-side Employee table)
CREATE TABLE Employee (Emp_ID INT PRIMARY KEY, Dept_ID INT NOT NULL REFERENCES Department(Dept_ID));
-- M:N Relationship (Separate Junction Table with Composite Primary Key)
CREATE TABLE Enrollment (
Student_ID INT REFERENCES Student(Student_ID),
Course_ID INT REFERENCES Course(Course_ID),
Enroll_Date DATE,
PRIMARY KEY (Student_ID, Course_ID)
);
Cardinality Ratios in Relationships: 1:1, 1:N, N:1, M:N Quick Reference & Comparison Table
| Cardinality Ratio | Maximum Association Rule | Relational Table & Key Mapping |
|---|---|---|
| 1:1 (One-to-One) | At most 1 entity in A maps to at most 1 in B | FK with UNIQUE constraint on one table (or merge tables) |
| 1:N (One-to-Many) | 1 entity in A maps to 0 or more entities in B | Primary Key of 1-side added as FK on N-side table |
| N:1 (Many-to-One) | Many entities in A map to at most 1 entity in B | Primary Key of 1-side placed as FK in A (N-side) |
| M:N (Many-to-Many) | Any number in A maps to any number in B | New bridge table with composite PK (PK_A, PK_B) |
Cardinality Ratios in Relationships: 1:1, 1:N, N:1, M:N Top 20 Bilingual MCQs with Answers
Q1. What does cardinality ratio in an ER model fundamentally specify?
(ER मॉडल में कार्डिनैलिटी अनुपात (Cardinality Ratio) मूलतः क्या निर्दिष्ट करता है?)
(A) The minimum number of attributes in an entity
(B) The maximum number of relationship instances an entity can participate in
(C) The total number of columns in a relational table
(D) The physical disk size of a foreign key index
Correct Answer: (B)
[EN] Cardinality ratio sets the upper bound (1 or many) on how many relationship instances an entity may join.
[HI] कार्डिनैलिटी अनुपात बताता है कि कोई एंटिटी अधिकतम कितनी बार किसी रिलेशनशिप में भाग ले सकती है।
Q2. In Korth's ER notation, what does a directed arrow pointing from a relationship diamond R toward entity set E signify?
(कोर्थ (Korth) के ER नोटेशन में रिलेशनशिप डायमंड R से एंटिटी सेट E की ओर जाता हुआ तीर (->) क्या दर्शाता है?)
(A) Entity set E has total participation
(B) Each entity on the opposite side relates to at most one entity in E (cardinality 1 at E)
(C) Entity set E can map to many entities in R
(D) Entity set E is a weak entity
Correct Answer: (B)
[EN] In Silberschatz/Korth notation, an arrow pointing to E means 'at most one' E per opposite entity; undirected means 'many'.
[HI] कोर्थ नोटेशन में जिस एंटिटी की ओर तीर होता है, वह 'अधिकतम एक' (1) की कार्डिनैलिटी को दर्शाता है।
Q3. If an ER diagram shows arrows pointing from relationship R to BOTH entity sets A and B (A <- R -> B), what is the cardinality ratio?
(यदि किसी ER डायग्राम में रिलेशनशिप R से दोनों एंटिटी सेट्स A और B की ओर तीर (A <- R -> B) बने हों, तो कार्डिनैलिटी क्या होगी?)
(A) N:1 (Many-to-One)
(B) 1:N (One-to-Many)
(C) M:N (Many-to-Many)
(D) 1:1 (One-to-One)
Correct Answer: (D)
[EN] Arrows on both sides indicate at most one entity on side A and at most one on side B, forming a 1:1 mapping.
[HI] दोनों ओर तीर होने का अर्थ है कि दोनों तरफ अधिकतम एक ही संबंध संभव है, अतः यह 1:1 अनुपात है।
Q4. In a 1:N relationship between Department (1) and Employee (N), where should the Foreign Key be placed?
(Department (1) और Employee (N) के बीच 1:N संबंध में फॉरेन की (Foreign Key) कहाँ रखी जाती है?)
(A) Neither table needs a foreign key
(B) Always in a compulsory third junction table
(C) In the Employee table (N-side), referencing Department_ID
(D) In the Department table (1-side), referencing Emp_ID
Correct Answer: (C)
[EN] To preserve 1NF atomic columns, the PK of the 1-side (Department) is placed as a FK in the N-side (Employee) table.
[HI] प्रत्येक कर्मचारी एक विभाग से जुड़ा है, इसलिए Department की प्राइमरी की को N-साइड (Employee टेबल) में रखा जाता है।
Q5. Which SQL constraint must accompany a Foreign Key column to strictly enforce a 1:1 cardinality ratio?
(1:1 कार्डिनैलिटी अनुपात को SQL में सख्ती से लागू करने के लिए फॉरेन की कॉलम पर कौन सा अतिरिक्त प्रतिबंध होना चाहिए?)
(A) AUTO_INCREMENT constraint
(B) DEFAULT NULL constraint
(C) UNIQUE constraint on the Foreign Key
(D) CHECK (FK > 0) constraint
Correct Answer: (C)
[EN] Adding UNIQUE ensures no two child rows can point to the same parent row, turning 1:N into 1:1.
[HI] फॉरेन की पर UNIQUE लगाने से एक पैरेंट रिकॉर्ड से केवल एक ही चाइल्ड रिकॉर्ड जुड़ सकता है, जिससे 1:1 सुनिश्चित होता है।
Q6. How many minimum relational tables are required for two strong entity sets connected by an M:N relationship?
(M:N संबंध से जुड़े दो मजबूत एंटिटी सेट्स को रिलेशनल मॉडल में बदलने के लिए न्यूनतम कितनी टेबल्स चाहिए?)
(A) 2 tables (FK placed on either side)
(B) 1 merged table
(C) 4 tables
(D) 3 tables (one for each entity + one junction table)
Correct Answer: (D)
[EN] M:N cannot be represented by embedding a FK in either entity table without redundancy, so a 3rd bridge table is mandatory.
[HI] M:N संबंध के लिए दो एंटिटी टेबल्स के अलावा एक तीसरी जंक्शन (Bridge) टेबल अनिवार्य होती है, कुल 3 टेबल्स।
Q7. What typically serves as the Primary Key of the junction table created from an M:N relationship between A and B?
(A और B के बीच M:N संबंध से बनने वाली नई जंक्शन टेबल की प्राइमरी की सामान्यतः क्या होती है?)
(A) Only the Primary Key of A
(B) Only the descriptive attribute of the relationship
(C) A random non-unique column
(D) Composite key combining Primary Keys of both A and B
Correct Answer: (D)
[EN] Combining (PK_A, PK_B) uniquely identifies each pair participating in the M:N relationship.
[HI] दोनों एंटिटी सेट्स की प्राइमरी कीज़ का संयोजन (Composite Key) ही जंक्शन टेबल की प्राइमरी की बनता है।
Q8. Which relationship ratio describes 'Many Patients are treated by One Doctor' when read from Patient to Doctor?
('अनेक मरीज़ों का इलाज एक डॉक्टर द्वारा किया जाता है'—Patient से Doctor की ओर पढ़ने पर यह कौन सा अनुपात है?)
(A) 1:1 (One-to-One)
(B) 1:N (One-to-Many) from Patient to Doctor
(C) N:1 (Many-to-One)
(D) M:N (Many-to-Many)
Correct Answer: (C)
[EN] From Patient (many) to Doctor (one), each patient maps to at most one doctor, making it N:1.
[HI] Patient की दिशा में अनेक और Doctor की दिशा में एक होने से यह N:1 (Many-to-One) संबंध कहलाता है।
Q9. Why can't an M:N relationship be implemented by placing a multi-valued list of IDs inside one table column?
(M:N संबंध को किसी एक टेबल के कॉलम में कई IDs की सूची रखकर क्यों नहीं बनाया जाता?)
(A) Composite keys cannot exist in SQL
(B) It automatically converts the relation to 1:1
(C) SQL forbids VARCHAR columns longer than 10 characters
(D) It violates First Normal Form (1NF) atomicity and breaks referential integrity
Correct Answer: (D)
[EN] Relational databases require atomic single values per cell (1NF) and single-value foreign key references.
[HI] एक सेल में एकाधिक मान रखना 1NF (परमाणु मान नियम) का उल्लंघन है और इससे फॉरेन की जांच संभव नहीं हो पाती।
Q10. In Crow's Foot ER notation, what does the symbol '|<' (vertical bar and three-pronged fork) on an entity edge mean?
(Crow's Foot ER नोटेशन में किसी एंटिटी किनारे पर '|<' चिह्न का क्या अर्थ होता है?)
(A) One or Many (mandatory many, minimum 1 and maximum N)
(B) Strictly Zero
(C) Zero or One (optional single)
(D) At most One (1:1)
Correct Answer: (A)
[EN] The inner vertical bar '|' means minimum 1 (mandatory), and the outer crow's foot '<' means maximum many.
[HI] भीतरी खड़ी रेखा '|' न्यूनतम 1 (अनिवार्य) और बाहरी पंजा '<' अधिकतम 'अनेक' (Many) भागीदारी दर्शाता है।
Q11. In a ternary relationship R connecting A, B, and C, if R has cardinality 1:N:M (1 toward C, N toward B, M toward A), what does the '1' toward C indicate?
(A, B, C के बीच एक टर्नरी रिलेशनशिप R में यदि C की ओर कार्डिनैलिटी '1' हो और A, B की ओर क्रमशः M, N हो, तो इसका क्या अर्थ है?)
(A) Each (A, B) pair can associate with at most one entity in C
(B) A and B can only have 1 tuple total
(C) Each C entity associates with at most one A
(D) C cannot have attributes
Correct Answer: (A)
[EN] In a ternary relationship, cardinality 1 on C means knowing both A and B uniquely determines at most one C.
[HI] टर्नरी संबंध में C की ओर '1' का अर्थ है कि (A, B) का प्रत्येक जोड़ा अधिकतम एक ही C से जुड़ सकता है।
Q12. In Elmasri & Navathe's (min, max) notation, what does (0, N) placed next to entity Customer on relationship PLACES mean?
(Elmasri व Navathe के (min, max) संकेतन में PLACES रिलेशनशिप पर Customer के बगल में (0, N) लिखा होने का क्या अर्थ है?)
(A) An order belongs to N customers
(B) A customer may place 0 (optional) to N (many) orders
(C) At least N customers must place 0 orders
(D) Customer is a weak entity with N attributes
Correct Answer: (B)
[EN] (min, max) next to Customer specifies that each Customer participates in at least 0 and at most N relationship instances.
[HI] Customer के पास (0, N) का अर्थ है कि एक ग्राहक न्यूनतम 0 (आंशिक) और अधिकतम N (अनेक) ऑर्डर दे सकता है।
Q13. Which real-world scenario is the best example of a 1:1 cardinality ratio?
(निम्नलिखित में से कौन सा वास्तविक परिदृश्य 1:1 कार्डिनैलिटी अनुपात का सबसे उपयुक्त उदाहरण है?)
(A) Country and its official Prime Minister (at a given point in time)
(B) Customer and Bank Transactions
(C) Teacher and Students taught
(D) Author and Books written
Correct Answer: (A)
[EN] At a given time, one country has one Prime Minister and that Prime Minister heads one country (1:1).
[HI] किसी समय विशेष पर एक देश का एक ही प्रधानमंत्री होता है और एक व्यक्ति एक ही देश का प्रधानमंत्री होता है (1:1)।
Q14. If Student and Club have an M:N relationship with attribute 'Join_Date', where is 'Join_Date' stored in the relational schema?
(यदि Student और Club के बीच M:N संबंध में 'Join_Date' एक एट्रिब्यूट हो, तो रिलेशनल स्कीमा में इसे कहाँ रखा जाएगा?)
(A) Inside the Club table only
(B) Inside the new junction table (e.g., Membership(Student_ID, Club_ID, Join_Date))
(C) Inside the Student table only
(D) It is discarded during ER conversion
Correct Answer: (B)
[EN] Descriptive attributes of an M:N relationship depend on the pair (Student_ID, Club_ID) and live inside the junction table.
[HI] M:N संबंध का वर्णनात्मक एट्रिब्यूट दोनों एंटिटीज़ के जोड़े पर निर्भर करता है, अतः वह नई जंक्शन टेबल में रखा जाता है।
Q15. If a 1:N relationship has descriptive attribute 'Start_Date' on the diamond (e.g., Dept EMPLOYS Emp), where is 'Start_Date' placed?
(यदि 1:N संबंध (Dept EMPLOYS Emp) में 'Start_Date' एट्रिब्यूट हो, तो इसे किस टेबल में रखा जाता है?)
(A) In the 1-side table (Department)
(B) Deleted automatically
(C) In the N-side table (Employee) alongside the Foreign Key Dept_ID
(D) In a mandatory 3rd table
Correct Answer: (C)
[EN] In 1:N, relationship attributes migrate to the N-side table because each N-side tuple participates in at most one instance.
[HI] 1:N संबंध में N-साइड की प्रत्येक रो एक ही संबंध से जुड़ती है, इसलिए संबंध का एट्रिब्यूट भी N-साइड टेबल में जाता है।
Q16. Which statement about Cardinality Ratios in ER models is FALSE?
(ER मॉडल में कार्डिनैलिटी अनुपात के संदर्भ में निम्नलिखित में से कौन सा कथन असत्य (FALSE) है?)
(A) N:1 is the directional converse of 1:N
(B) M:N relationships require an associative/junction table
(C) 1:1 can sometimes be merged into a single table when participation is total
(D) 1:N relationships always require creating a mandatory third table in relational mapping
Correct Answer: (D)
[EN] 1:N maps directly into two tables by placing the 1-side PK as a FK on the N-side; a 3rd table is not required.
[HI] 1:N को केवल दो टेबल्स में फॉरेन की जोड़कर दर्शाया जाता है, इसके लिए तीसरी टेबल बनाना अनिवार्य नहीं है।
Q17. Within Cardinality Ratios in Relationships: 1:1, 1:N, N:1, M:N, which cardinality ratio directly maps to: "At most 1 entity in A maps to at most 1 in B"?
(Cardinality Ratios in Relationships: 1:1, 1:N, N:1, M:N में कौन सा Cardinality Ratio सीधे "At most 1 entity in A maps to at most 1 in B" से संबंधित है?)
(A) 1:1 (One-to-One)
(B) 1:N (One-to-Many)
(C) M:N (Many-to-Many)
(D) N:1 (Many-to-One)
Correct Answer: (A)
[EN] In Cardinality Ratios in Relationships: 1:1, 1:N, N:1, M:N, '1:1 (One-to-One)' handles 'At most 1 entity in A maps to at most 1 in B' (FK with UNIQUE constraint on one table (or merge tables)).
[HI] Cardinality Ratios in Relationships: 1:1, 1:N, N:1, M:N में '1:1 (One-to-One)' का कार्य/विवरण 'At most 1 entity in A maps to at most 1 in B' (FK with UNIQUE constraint on one table (or merge tables)) है।
Q18. Which option accurately describes '1:N (One-to-Many)' in Cardinality Ratios in Relationships: 1:1, 1:N, N:1, M:N?
(Cardinality Ratios in Relationships: 1:1, 1:N, N:1, M:N के संदर्भ में '1:N (One-to-Many)' की सही विशेषता कौन सी है?)
(A) At most 1 entity in A maps to at most 1 in B
(B) Any number in A maps to any number in B
(C) Many entities in A map to at most 1 entity in B
(D) 1 entity in A maps to 0 or more entities in B
Correct Answer: (D)
[EN] '1:N (One-to-Many)' provides '1 entity in A maps to 0 or more entities in B' — key point: Primary Key of 1-side added as FK on N-side table.
[HI] '1:N (One-to-Many)' का मुख्य विवरण '1 entity in A maps to 0 or more entities in B' है (Primary Key of 1-side added as FK on N-side table)।
Q19. In Cardinality Ratios in Relationships: 1:1, 1:N, N:1, M:N, identify the correct parameter for the specification: "Many entities in A map to at most 1 entity in B".
(Cardinality Ratios in Relationships: 1:1, 1:N, N:1, M:N में "Many entities in A map to at most 1 entity in B" विवरण किस विकल्प के लिए सही है?)
(A) 1:N (One-to-Many)
(B) M:N (Many-to-Many)
(C) N:1 (Many-to-One)
(D) 1:1 (One-to-One)
Correct Answer: (C)
[EN] 'N:1 (Many-to-One)' corresponds to 'Many entities in A map to at most 1 entity in B' (Primary Key of 1-side placed as FK in A (N-side)).
[HI] 'N:1 (Many-to-One)' का संबंध 'Many entities in A map to at most 1 entity in B' (Primary Key of 1-side placed as FK in A (N-side)) से है।
Q20. Considering Cardinality Ratios in Relationships: 1:1, 1:N, N:1, M:N, what key behavior defines 'M:N (Many-to-Many)'?
(Cardinality Ratios in Relationships: 1:1, 1:N, N:1, M:N में 'M:N (Many-to-Many)' की मुख्य भूमिका या मान क्या है?)
(A) Any number in A maps to any number in B
(B) 1 entity in A maps to 0 or more entities in B
(C) At most 1 entity in A maps to at most 1 in B
(D) Many entities in A map to at most 1 entity in B
Correct Answer: (A)
[EN] 'M:N (Many-to-Many)' represents 'Any number in A maps to any number in B' (New bridge table with composite PK (PK_A, PK_B)).
[HI] 'M:N (Many-to-Many)' का अर्थ/मान 'Any number in A maps to any number in B' है (New bridge table with composite PK (PK_A, PK_B))।
Cardinality Ratios in Relationships: 1:1, 1:N, N:1, M:N — Exam FAQs
Q1: What is the difference between 1:N and N:1 in an ER diagram?
ER डायग्राम में 1:N और N:1 के बीच क्या अंतर है?
[EN] Structurally they represent the exact same relationship viewed from opposite directions: Department-to-Employee is 1:N, whereas Employee-to-Department is N:1. In both cases, the foreign key resides on the 'N' (many) side.
[HI] दोनों संरचनात्मक रूप से एक ही संबंध को दो दिशाओं से देखने के तरीके हैं: विभाग-से-कर्मचारी 1:N है और कर्मचारी-से-विभाग N:1। दोनों में फॉरेन की हमेशा 'N' (अनेक) साइड वाली टेबल में रखी जाती है।
Q2: Can a 1:1 relationship ever be converted into a single table instead of two?
क्या 1:1 संबंध को दो टेबल्स के बजाय एक ही टेबल में मर्ज किया जा सकता है?
[EN] Yes, if both entity sets have total participation in the 1:1 relationship (every A matches exactly one B and vice versa), merging both entities and the relationship into a single table avoids joins and null values.
[HI] हाँ, यदि दोनों एंटिटी सेट्स की भागीदारी पूर्ण (Total) हो अर्थात प्रत्येक A का ठीक एक B हो, तो दोनों को एक ही टेबल में मर्ज किया जा सकता है।
Q3: How is cardinality ratio different from the cardinality of a relational table?
ER कार्डिनैलिटी अनुपात और रिलेशनल टेबल की कार्डिनैलिटी में क्या अंतर है?
[EN] ER cardinality ratio (1:1, 1:N, M:N) describes the mapping constraint between two entity sets, whereas relational table cardinality simply counts the current number of rows (tuples) stored in a table.
[HI] ER कार्डिनैलिटी अनुपात (1:1, 1:N, M:N) एंटिटीज़ के बीच जुड़ाव की सीमा बताता है, जबकि टेबल की कार्डिनैलिटी का अर्थ उस टेबल में मौजूद कुल रोज़ (Tuples) की संख्या से है।
Post a Comment
Post a Comment