Components of ER Model in Hindi
Components of ER Model in Hindi
Table of Contents
- Entity Sets - Entity sets ka arth aur unka mahatva
- Relationship Sets - Relationship sets ka parichay aur vidhiyon ka samarthan
- Attributes - Attributes ki vyakhya aur unke prakar
- Primary Keys - Primary keys ka mahatva aur udaharan
Entity Sets in ER Model
Entity sets ER (Entity Relationship) model का एक अहम हिस्सा हैं। Entity sets को समझने के लिए सबसे पहले यह जानना जरूरी है कि "Entity" का क्या मतलब होता है। किसी भी ऐसे object या concept को "Entity" कहा जाता है, जिसका existence database में किया जा सके। उदाहरण के लिए, अगर हम एक school database design कर रहे हैं, तो "Student", "Teacher" और "Class" ये सब entities हो सकते हैं।
Entity Set Definition
Entity set, एक जैसे entities का collection होता है। अगर किसी entity के अंदर समान properties (attributes) होते हैं, तो उन सब को एक set में रखा जाता है। उदाहरण के तौर पर, एक "Student" entity set में सभी students के बारे में जानकारी रखी जा सकती है, जैसे कि उनका नाम, पता, रोल नंबर, आदि।
Entity Set Characteristics
- Entity Name: Entity set का नाम unique होना चाहिए। जैसे "Student" या "Teacher"।
- Attributes: Entities में कुछ characteristics होती हैं, जैसे नाम, उम्र, आदि। इन्हें attributes कहा जाता है।
- Uniqueness: हर entity set में कुछ ऐसे attributes होते हैं, जो उसे unique बनाते हैं, जैसे छात्र का रोल नंबर।
Example of Entity Set
मान लीजिए "Teacher" नाम का एक entity set है, तो इसमें सभी teacher के नाम, उम्र, शिक्षा, और काम करने का अनुभव जैसी जानकारी एक साथ रखी जा सकती है।
Relationship Sets in ER Model
Relationship sets, entities के बीच के संबंधों को represent करते हैं। ER model में relationship sets का बहुत महत्वपूर्ण role होता है क्योंकि ये data को जोड़ने का काम करते हैं।
Relationship Set Definition
Relationship set वह set है, जो एक या अधिक entity sets के बीच संबंधों को दर्शाता है। उदाहरण के लिए, अगर "Teacher" और "Student" के बीच एक संबंध है कि "Teacher teaches Student", तो इसे एक relationship set माना जाएगा।
Types of Relationship Sets
- One-to-One: एक entity से जुड़ी केवल एक entity होती है। जैसे, एक "Teacher" का सिर्फ एक "Class" से संबंध हो सकता है।
- One-to-Many: एक entity से कई entities जुड़ी होती हैं। जैसे, एक "Teacher" कई "Students" को पढ़ाता है।
- Many-to-Many: कई entities के बीच संबंध होते हैं। जैसे, कई "Students" कई "Teachers" से पढ़ते हैं।
Example of Relationship Set
अगर एक "Teacher" और "Student" के बीच "teaches" नामक relationship set है, तो यह दर्शाता है कि teacher किसी student को पढ़ाता है।
Attributes in ER Model
Attributes, entities और relationships की characteristics होती हैं। ER model में attributes का उपयोग यह जानने के लिए किया जाता है कि entities या relationships के बारे में और कौन सी जानकारी मौजूद है।
Attributes Definition
Attribute, किसी entity या relationship का एक गुण है। जैसे कि एक "Student" entity में "Name", "Age", और "Grade" attributes हो सकते हैं।
Types of Attributes
- Simple Attributes: ये attributes होते हैं जिनका कोई internal structure नहीं होता। जैसे "Student Name" या "Age"।
- Composite Attributes: ये attributes ऐसे होते हैं, जो कई attributes से मिलकर बने होते हैं। जैसे "Full Address" जो "Street", "City", और "Zip Code" से मिलकर बनता है।
- Derived Attributes: ये attributes ऐसे होते हैं, जो किसी अन्य attribute से निकाले जाते हैं। जैसे "Age" जो "Date of Birth" से निकाला जा सकता है।
Example of Attributes
अगर "Student" entity के अंदर "Name", "Roll Number", "Address", और "Grade" जैसे attributes हैं, तो ये सभी attributes उस student के बारे में जानकारी प्रदान करेंगे।
Primary Keys in ER Model
Primary key, एक entity set में unique identifier के रूप में कार्य करता है। यह किसी entity set के अंदर हर entity को uniquely पहचानने के लिए उपयोगी होता है।
Primary Key Definition
Primary key एक attribute या attributes का set होता है, जो entity set में हर entity को uniquely identify करता है। उदाहरण के लिए, "Student Roll Number" एक primary key हो सकती है, क्योंकि यह हर student के लिए unique होती है।
Characteristics of Primary Key
- Uniqueness: Primary key का value किसी भी दो entities में समान नहीं हो सकता।
- Non-null: Primary key का value null नहीं हो सकता।
- Minimal: Primary key में केवल उतने attributes होते हैं, जितने कि entity को uniquely पहचानने के लिए जरूरी होते हैं।
Example of Primary Key
अगर "Student" entity set में "Roll Number" को primary key माना जाता है, तो यह सुनिश्चित करता है कि कोई भी दो students का roll number समान नहीं होगा।
External Link
अगर आप ER Model के बारे में अधिक जानकारी चाहते हैं तो आप GeeksforGeeks पर जा सकते हैं।
FAQs
Entity Set, ER Model का एक महत्वपूर्ण हिस्सा है। यह एक जैसे entities का समूह होता है। जैसे "Student", "Teacher", या "Class"। Entity set में सभी entities के समान attributes होते हैं, जैसे कि नाम, उम्र, या रोल नंबर। Entity sets database में एक organized structure बनाने के लिए उपयोग होते हैं।
Relationship Set, ER Model में entities के बीच के संबंधों को दर्शाता है। यह entities के बीच interactions को स्पष्ट करता है, जैसे "Teacher" और "Student" के बीच "teaches" relationship. Relationship sets की मदद से हम यह जान सकते हैं कि कौन सी entities एक-दूसरे से जुड़ी हुई हैं।
ER Model में Attribute किसी entity या relationship की विशेषता होती है। जैसे, एक "Student" entity का "Name", "Roll Number", "Address" ये सभी attributes होते हैं। Attributes से हम entities के बारे में अधिक जानकारी प्राप्त कर सकते हैं।
Primary Key, ER Model में एक ऐसा attribute होता है, जो किसी entity को uniquely पहचानने में मदद करता है। यह attribute null नहीं हो सकता और इसकी value किसी भी दो entities में समान नहीं हो सकती। जैसे, "Student Roll Number" एक primary key हो सकती है, क्योंकि यह हर student के लिए unique होती है।
Composite Attribute, ER Model में एक ऐसा attribute होता है, जो कई छोटे attributes से मिलकर बनता है। उदाहरण के लिए, "Address" को composite attribute माना जा सकता है, क्योंकि इसमें "Street", "City", और "Zip Code" जैसे attributes शामिल होते हैं।
ER Model में Relationship Set के मुख्य तीन types होते हैं:
- One-to-One: एक entity से जुड़ी केवल एक entity होती है।
- One-to-Many: एक entity से कई entities जुड़ी होती हैं।
- Many-to-Many: कई entities के बीच संबंध होते हैं।