Table of Contents

Subject Video ▶

What is ER Model in Hindi – ER Model क्या है?

Get Your Professional Business Website

ER Model का पूरा नाम Entity Relationship Model है। यह Database Design का एक महत्वपूर्ण concept है, जिसका उपयोग Real-World Objects, उनकी Properties और उनके बीच के Relationships को Graphical Form में दर्शाने के लिए किया जाता है।

ER Model की मदद से यह समझा जाता है कि किसी Database में कौन-कौन सी Entities होंगी, उनकी कौन-कौन सी Attributes होंगी और वे एक-दूसरे से किस प्रकार जुड़ी होंगी। इससे Database का Structure तैयार करना आसान हो जाता है।

ER Model को Peter Chen ने 1976 में प्रस्तुत किया था। इसे Database Design के शुरुआती चरण में इस्तेमाल किया जाता है। ER Model के आधार पर ER Diagram बनाया जाता है, जिसे देखकर Developers Database की Structure को आसानी से समझ सकते हैं।

Example of ER Model

मान लीजिए किसी College में Students और Courses की जानकारी Store करनी है। यहाँ Student और Course दो Entities हैं। Student की Attributes में Student_ID, Name और Roll_Number शामिल हो सकते हैं। Course की Attributes में Course_ID और Course_Name शामिल हो सकते हैं।

Components of ER Model in Hindi – ER Model के घटक

ER Model के मुख्य Components Entity, Attribute और Relationship हैं। इनके अलावा Entity Set और Relationship Set जैसे Concepts भी Database Design को समझने में मदद करते हैं।

1. Entity

Entity कोई ऐसी Real-World Object, Person, Place या Thing होती है जिसके बारे में Database में Information Store की जाती है। प्रत्येक Entity की अपनी पहचान और कुछ Properties हो सकती हैं।

उदाहरण के लिए, Student, Teacher, Employee, Product और Department Entities हो सकती हैं। किसी College Database में प्रत्येक Student को एक अलग Entity के रूप में Represent किया जा सकता है।

2. Entity Set

समान प्रकार की Entities के Collection को Entity Set कहा जाता है। उदाहरण के लिए, College के सभी Students का समूह Student Entity Set कहलाएगा। इसी प्रकार सभी Employees का समूह Employee Entity Set कहलाता है।

3. Attribute

Attribute किसी Entity की Property या विशेषता को दर्शाता है। इसकी मदद से Entity के बारे में अधिक जानकारी प्राप्त होती है।

उदाहरण के लिए, Student Entity की Attributes Student_ID, Name, Date_of_Birth और Address हो सकती हैं। इनमें Student_ID प्रत्येक Student की पहचान करने के लिए इस्तेमाल किया जा सकता है।

4. Relationship

Relationship दो या दो से अधिक Entities के बीच Connection को दर्शाता है। इससे पता चलता है कि Entities एक-दूसरे से किस प्रकार जुड़ी हुई हैं।

उदाहरण के लिए, Student और Course के बीच Enrolls Relationship हो सकती है। इसी तरह Employee और Department के बीच Works_In Relationship हो सकती है।

5. Relationship Set

एक ही प्रकार के Relationships के Collection को Relationship Set कहा जाता है। उदाहरण के लिए, College के सभी Students और Courses के बीच मौजूद Enrolls Connections का समूह Relationship Set का उदाहरण हो सकता है।

6. Key Attribute

Key Attribute वह Attribute होती है जो किसी Entity को दूसरे समान प्रकार के Entities से अलग पहचानने में मदद करती है। उदाहरण के लिए, Student_ID का उपयोग प्रत्येक Student को Uniquely Identify करने के लिए किया जा सकता है।

ER Diagram Symbols in Hindi – ER Diagram के Symbols

ER Diagram में अलग-अलग Components को दर्शाने के लिए विशेष Symbols का इस्तेमाल किया जाता है। इन Symbols की मदद से Database की Structure को आसानी से समझा जा सकता है।

Symbol Meaning Example
Rectangle Entity को दर्शाता है। Student, Employee
Oval / Ellipse Attribute को दर्शाता है। Name, Age
Diamond Relationship को दर्शाता है। Enrolls, Works_In
Underlined Attribute Key Attribute को दर्शाता है। Student_ID
Double Oval Multivalued Attribute को दर्शाता है। Phone_Number
Dashed Oval Derived Attribute को दर्शाता है। Age
Double Rectangle Weak Entity को दर्शाता है। Dependent Entity
Double Diamond Identifying Relationship को दर्शाता है। Owner-Dependent Connection

ER Diagram बनाते समय Entities को Rectangles, Attributes को Ovals और Relationships को Diamonds से दर्शाया जाता है। अलग-अलग ER Diagram Notations में कुछ Symbols का तरीका थोड़ा अलग हो सकता है।

Types of Attributes in ER Model in Hindi – Attributes के प्रकार

ER Model में Attributes को उनकी Structure, Values और उपयोग के आधार पर अलग-अलग प्रकारों में बाँटा जाता है। मुख्य प्रकार निम्नलिखित हैं।

1. Simple Attribute

Simple Attribute वह Attribute होती है जिसे छोटे Parts में Divide नहीं किया जा सकता। इसे Atomic Attribute भी कहा जाता है।

Example: Age, Salary और Gender को सामान्य ER Model में Simple Attributes के रूप में दिखाया जा सकता है।

2. Composite Attribute

Composite Attribute को छोटे-छोटे Sub-Attributes में Divide किया जा सकता है। इससे किसी Property की अलग-अलग Details Store की जा सकती हैं।

Example: Name को First_Name, Middle_Name और Last_Name में Divide किया जा सकता है। इसी प्रकार Address को City, State और Pin_Code में बाँटा जा सकता है।

3. Single-Valued Attribute

Single-Valued Attribute किसी एक Entity के लिए केवल एक Value रखती है। प्रत्येक Student का एक Student_ID होना इसका उदाहरण है।

Example: किसी Student का Roll_Number सामान्यतः एक ही होता है। इसलिए इसे Single-Valued Attribute कहा जा सकता है।

4. Multivalued Attribute

Multivalued Attribute में एक Entity के लिए एक से अधिक Values हो सकती हैं। ER Diagram में इसे Double Oval से दर्शाया जाता है।

Example: किसी Student के एक से अधिक Phone Numbers हो सकते हैं। ऐसी स्थिति में Phone_Number को Multivalued Attribute माना जा सकता है।

5. Derived Attribute

Derived Attribute की Value किसी दूसरी Stored Attribute की मदद से Calculate की जाती है। ER Diagram में इसे सामान्यतः Dashed Oval से दर्शाया जाता है।

Example: Date_of_Birth की मदद से किसी व्यक्ति की Age Calculate की जा सकती है। इसलिए Age एक Derived Attribute हो सकती है।

6. Key Attribute

Key Attribute किसी Entity को Uniquely Identify करती है। एक Entity Set में इसकी Value प्रत्येक Entity के लिए अलग होती है। ER Diagram में Key Attribute के नाम को Underline किया जाता है।

Example: Student_ID की मदद से किसी College के प्रत्येक Student की अलग पहचान की जा सकती है।

7. Null or Optional Attribute

कुछ Attributes की Value हर Entity के लिए उपलब्ध होना जरूरी नहीं होता। ऐसी Attribute की Value किसी Record में Missing या Not Applicable हो सकती है। Database Design में इस बात को ध्यान में रखना जरूरी है।

Example: किसी Student का Middle_Name न होने पर यह Value उपलब्ध नहीं हो सकती। हालांकि, NULL को ER Diagram में दर्शाने का तरीका इस्तेमाल की जा रही Notation पर निर्भर करता है।

Types of Relationships in ER Model in Hindi – Relationships के प्रकार

ER Model में Relationship यह बताता है कि अलग-अलग Entities के बीच किस प्रकार का Connection है। Entities की संख्या के आधार पर Relationship को अलग-अलग प्रकारों में समझा जाता है।

1. One-to-One Relationship (1:1)

One-to-One Relationship में एक Entity का संबंध दूसरी Entity की अधिकतम एक Entity से होता है और दूसरी Entity का संबंध भी पहली Entity की अधिकतम एक Entity से होता है।

Example: यदि किसी Organization में प्रत्येक Employee को अधिकतम एक Company ID Card दिया जाता है और प्रत्येक Card केवल एक Employee को दिया जाता है, तो यह One-to-One Relationship का उदाहरण हो सकता है।

2. One-to-Many Relationship (1:N)

One-to-Many Relationship में एक Entity का संबंध दूसरी Entity की कई Entities से हो सकता है। लेकिन दूसरी Entity की प्रत्येक Entity का संबंध पहली Entity की अधिकतम एक Entity से होता है।

Example: एक Department में कई Employees काम कर सकते हैं, जबकि प्रत्येक Employee को एक Department से जोड़ा जा सकता है। इस स्थिति में Department और Employee के बीच One-to-Many Relationship होती है।

3. Many-to-One Relationship (N:1)

Many-to-One Relationship में कई Entities का संबंध एक Entity से हो सकता है। यह One-to-Many Relationship को विपरीत दिशा से देखने पर समझी जा सकती है।

Example: कई Employees एक ही Department में काम कर सकते हैं। Employees से Department की ओर देखने पर यह Many-to-One Relationship है।

4. Many-to-Many Relationship (M:N)

Many-to-Many Relationship में एक Entity का संबंध दूसरी Entity की कई Entities से हो सकता है और दूसरी Entity का संबंध भी पहली Entity की कई Entities से हो सकता है।

Example: एक Student कई Courses में Enroll हो सकता है और प्रत्येक Course में कई Students Enroll हो सकते हैं। इसलिए Student और Course के बीच Many-to-Many Relationship होती है।

5. Unary or Recursive Relationship

जब किसी Entity Set की Entities का Relationship उसी Entity Set की दूसरी Entities से होता है, तो इसे Unary या Recursive Relationship कहा जाता है।

Example: किसी Company में एक Employee दूसरे Employee को Manage कर सकता है। यहाँ Employee Entity का Relationship उसी Employee Entity Set के साथ है।

6. Ternary Relationship

जब किसी Relationship में एक साथ तीन Entity Sets शामिल होते हैं, तो उसे Ternary Relationship कहा जाता है।

Example: Supplier, Product और Project के बीच Supply Relationship को Ternary Relationship के रूप में दर्शाया जा सकता है, यदि यह संबंध तीनों Entities की एक साथ भागीदारी पर निर्भर करता हो।

Cardinality and Participation Constraints in Hindi – Cardinality और Participation Constraints

ER Model में Cardinality और Participation Constraints की मदद से यह बताया जाता है कि किसी Relationship में कितनी Entities शामिल हो सकती हैं और किसी Entity के लिए उस Relationship में भाग लेना जरूरी है या नहीं।

Cardinality

Cardinality यह बताती है कि एक Entity का संबंध दूसरी Entity की कितनी Instances से हो सकता है। इसके प्रमुख प्रकार One-to-One, One-to-Many, Many-to-One और Many-to-Many हैं।

Participation Constraints

Participation Constraint यह बताता है कि किसी Entity Set की सभी Entities को Relationship में भाग लेना जरूरी है या केवल कुछ Entities भाग ले सकती हैं।

  1. Total Participation: इसमें Entity Set की प्रत्येक Entity को संबंधित Relationship में भाग लेना जरूरी होता है। Chen Notation में इसे Double Line से दर्शाया जाता है।
  2. Partial Participation: इसमें Entity Set की प्रत्येक Entity के लिए Relationship में भाग लेना जरूरी नहीं होता। Chen Notation में इसे Single Line से दर्शाया जाता है।

Example: यदि किसी Organization के नियम के अनुसार प्रत्येक Employee को किसी Department में काम करना जरूरी है, तो Employee का Department Relationship में Total Participation हो सकता है। यदि किसी Employee के लिए किसी विशेष Committee का Member होना जरूरी नहीं है, तो उस Relationship में Partial Participation हो सकता है।

Steps to Create an ER Diagram in Hindi – ER Diagram बनाने के चरण

ER Diagram बनाने के लिए Database की जरूरतों को समझकर Entities, Attributes और Relationships को सही क्रम में Identify किया जाता है। इसके प्रमुख चरण निम्नलिखित हैं।

  1. सबसे पहले उस System की जरूरतों को समझें जिसके लिए Database तैयार किया जा रहा है।
  2. System में मौजूद मुख्य Entities को Identify करें, जैसे Student, Course, Teacher या Department।
  3. प्रत्येक Entity की Attributes तय करें, जैसे Student_ID, Name और Address।
  4. प्रत्येक Entity की पहचान के लिए उचित Key Attribute चुनें।
  5. Entities के बीच Relationships Identify करें, जैसे Student Enrolls in Course।
  6. Relationships की Cardinality तय करें कि वे 1:1, 1:N या M:N हैं।
  7. जरूरत के अनुसार Total और Partial Participation Constraints निर्धारित करें।
  8. सही Symbols का इस्तेमाल करके ER Diagram बनाएँ और उसे Requirements के अनुसार Verify करें।

ER Model Example in Hindi – ER Model का उदाहरण

मान लीजिए किसी College के लिए Database Design करना है। इसमें Students और Courses की जानकारी रखनी है। एक Student कई Courses में Enroll हो सकता है और एक Course में कई Students हो सकते हैं।

इस उदाहरण में Student और Course Entities हैं। Student_ID और Course_ID उनकी Key Attributes हैं। Student का Name और Course का Course_Name अन्य Attributes हैं। Enrolls दोनों Entities के बीच Relationship है।

+----------------+       +----------------+       +----------------+
|    STUDENT     |       |    ENROLLS     |       |     COURSE     |
+----------------+       +----------------+       +----------------+
| Student_ID (PK)|-------|                |-------| Course_ID (PK) |
| Name           |       | Enrollment_Date|       | Course_Name    |
| Roll_Number    |       |                |       | Credits        |
+----------------+       +----------------+       +----------------+
        M                       M:N                        N

ऊपर दिया गया Text Diagram केवल Concept समझाने के लिए है। Standard ER Diagram में STUDENT और COURSE को Entity Rectangles, ENROLLS को Relationship Diamond और Attributes को Ovals से दर्शाया जाता है। इस उदाहरण में Student और Course के बीच Many-to-Many Relationship है।

Relational Database में इस Many-to-Many Relationship को लागू करने के लिए ENROLLMENT जैसी अलग Table बनाई जा सकती है, जिसमें Student_ID और Course_ID को संबंधित Records से जोड़ने के लिए इस्तेमाल किया जाता है। Enrollment_Date जैसी Relationship से जुड़ी जानकारी भी इस Table में रखी जा सकती है।

Advantages of ER Model in Hindi

  1. Simple Representation: ER Model data को graphical form में represent करता है जिससे समझना आसान होता है।
  2. Better Database Design: Database structure clear और well-organized बनता है।
  3. Improved Communication: Developers और stakeholders के बीच communication बेहतर होता है।
  4. Reduces Complexity: Complex systems को simple diagrams में represent किया जा सकता है।
  5. Easy Conversion: ER Model को relational model में आसानी से convert किया जा सकता है।

Disadvantages of ER Model in Hindi

  1. Limited Representation: कुछ complex constraints को ER Model में represent करना मुश्किल होता है।
  2. No Standard Notation: Different tools में different notations use होती हैं।
  3. Time Consuming: Large systems के लिए ER diagram बनाना time-consuming होता है।
  4. Complex Diagrams: बड़े databases में diagrams बहुत complex हो जाते हैं।
  5. Not Suitable for Dynamic Data: Dynamic behavior को represent करना कठिन होता है।

Applications of ER Model in Hindi – ER Model के उपयोग

ER Model का इस्तेमाल उन Systems के Database Design में किया जा सकता है जहाँ अलग-अलग प्रकार के Data और उनके बीच Relationships को व्यवस्थित करना जरूरी होता है।

  1. College Management System: Students, Teachers, Courses, Departments और Enrollments की Structure Design करने में।
  2. Banking System: Customers, Bank Accounts, Transactions और Branches के बीच Relationships को दर्शाने में।
  3. Hospital Management System: Patients, Doctors, Appointments और Medical Records से संबंधित Data को Plan करने में।
  4. Library Management System: Books, Members, Authors और Book Issue Records की Structure तैयार करने में।
  5. E-commerce System: Customers, Products, Orders, Payments और Categories के बीच Relationships को समझने में।
  6. Employee Management System: Employees, Departments, Jobs और Managers से संबंधित Data को व्यवस्थित करने में।

ER Model vs Relational Model in Hindi – ER Model और Relational Model में अंतर

ER Model और Relational Model दोनों Database Design में इस्तेमाल होते हैं, लेकिन इनका उद्देश्य और Representation अलग होता है।

ER Model Relational Model
यह Entities, Attributes और Relationships के माध्यम से Data को Represent करता है। यह Data को Tables यानी Relations के रूप में Represent करता है।
इसका इस्तेमाल मुख्य रूप से Conceptual Database Design में किया जाता है। इसका इस्तेमाल Database की Logical Structure को व्यवस्थित करने में किया जाता है।
इसमें Entity के लिए Rectangle, Attribute के लिए Oval और Relationship के लिए Diamond जैसे Symbols इस्तेमाल होते हैं। इसमें Rows, Columns, Primary Keys और Foreign Keys जैसे Concepts इस्तेमाल होते हैं।
यह Database की Structure को Diagram के माध्यम से समझाता है। यह Data को Tables के रूप में व्यवस्थित करता है।
ER Model को Relational Model में Map किया जा सकता है। Relational Model के आधार पर Relational Database में Tables बनाई जा सकती हैं।

Frequently Asked Questions in Hindi – अक्सर पूछे जाने वाले सवाल

ER Model का पूरा नाम Entity Relationship Model है। इसका उपयोग Database Design में Entities, Attributes और Relationships को Graphical Form में Represent करने के लिए किया जाता है।

ER Model को Peter Chen ने 1976 में प्रस्तुत किया था।

ER Model के मुख्य Components Entity, Attribute और Relationship हैं। Entity Set और Relationship Set भी इससे जुड़े महत्वपूर्ण Concepts हैं।

मुख्य प्रकारों में Simple Attribute, Composite Attribute, Single-Valued Attribute, Multivalued Attribute, Derived Attribute और Key Attribute शामिल हैं।

मुख्य प्रकार One-to-One, One-to-Many, Many-to-One और Many-to-Many हैं। Unary और Ternary Relationships भी ER Model में इस्तेमाल की जाती हैं।

Key Attribute वह Attribute होती है जिसकी मदद से किसी Entity को Uniquely Identify किया जाता है। उदाहरण के लिए, Student_ID किसी Student की पहचान करने के लिए इस्तेमाल किया जा सकता है।

Entity किसी Real-World Object को दर्शाती है, जबकि Attribute उस Entity की Property बताती है। उदाहरण के लिए, Student एक Entity है और Student का Name उसकी Attribute है।

ER Model Database Structure को समझने, Entities और Relationships Identify करने, Database Design Plan करने और Developers तथा Users के बीच Communication बेहतर बनाने में मदद करता है।

बड़े ER Diagrams को समझना कठिन हो सकता है। कुछ Complex Constraints को Basic ER Model में Represent करना मुश्किल होता है और वास्तविक Database बनाने के लिए अतिरिक्त Technical Details की जरूरत होती है।

ER Model Entities, Attributes और Relationships को Diagram में Represent करता है, जबकि Relational Model Data को Tables, Rows और Columns के रूप में व्यवस्थित करता है। ER Model का इस्तेमाल Conceptual Design में किया जा सकता है और इसे Relational Model में Map किया जा सकता है।

Srajan

✍️ Srajan

Diploma | Content Writer

•