Steps in ER to Relational Mapping in Hindi
Steps in ER to Relational Mapping
Table of Contents — SEO Optimized
- Identify Entity Sets — ये SEO में मदद करता है
- Identify Attributes and Their Types — ये SEO में मदद करता है
- Identify Primary Keys — ये SEO में मदद करता है
- Identify Relationships — ये SEO में मदद करता है
- Map One-to-One Relationships — ये SEO में मदद करता है
- Map One-to-Many Relationships — ये SEO में मदद करता है
- Map Many-to-Many Relationships — ये SEO में मदद करता है
- Map Multivalued & Composite Attributes — ये SEO में मदद करता है
- Map Weak Entities and Identifying Owners — ये SEO में मदद करता है
- Map ISA (Generalization/Specialization) — ये SEO में मदद करता है
- Final Review and Normalization — ये SEO में मदद करता है
Steps in ER to Relational Mapping in Hindi
ER to Relational Mapping in Hindi का मतलब है — Entity Relationship Model को Relational Database Schema में बदलना। यह Database Design का एक बहुत जरूरी हिस्सा है जो हमें Logical Structure बनाने में मदद करता है। इस प्रक्रिया में हम Entities, Attributes, और Relationships को Table Format में परिवर्तित करते हैं ताकि उन्हें SQL या अन्य Database Systems में Implement किया जा सके।
1. Identify Entity Sets (Entity Sets की पहचान करें)
सबसे पहले हमें उन सभी Entity Sets की पहचान करनी होती है जो Database का हिस्सा होंगी। Entity किसी भी Object या Concept को Represent करती है — जैसे Student, Teacher, या Course। हर Entity का एक Unique Identity होती है जिससे उसे Database में अलग-अलग पहचाना जा सके।
- हर Entity को एक Table के रूप में Represent किया जाता है।
- Entity के नाम को Table Name के रूप में Use करते हैं।
- हर Entity के Attributes को Table के Columns बनाते हैं।
2. Identify Attributes (Attributes की पहचान करें)
Entity के साथ जुड़े Features या Properties को Attributes कहा जाता है। उदाहरण के लिए — Student Entity के Attributes हो सकते हैं: Student_ID, Name, Age, Class आदि।
- Simple Attributes को सीधे Columns में Convert किया जाता है।
- Composite Attributes को छोटे Attributes में Divide किया जाता है।
- Multivalued Attributes को Separate Table में रखा जाता है।
3. Identify Primary Keys (Primary Keys निर्धारित करें)
हर Table में एक ऐसा Attribute होना चाहिए जो Record को Unique पहचान दे, उसे Primary Key कहते हैं। यह Key Duplicate Values को रोकती है और Data Integrity बनाए रखती है।
- हर Table में केवल एक Primary Key होती है।
- अगर Single Attribute Unique नहीं है, तो Composite Key बनाई जा सकती है।
4. Identify Relationships (Relationships की पहचान करें)
जब दो Entities के बीच कोई Connection होता है, उसे Relationship कहा जाता है। उदाहरण: Teacher और Student के बीच “Teaches” Relationship।
- Relationships को Foreign Keys के माध्यम से Map किया जाता है।
- यह One-to-One, One-to-Many या Many-to-Many हो सकती हैं।
5. Map One-to-One Relationships
One-to-One Relationship में हर Entity केवल एक Entity से जुड़ी होती है। जैसे — Student ↔ Hostel_Room।
- दोनों Entities में से किसी एक के Primary Key को दूसरी में Foreign Key के रूप में शामिल करते हैं।
6. Map One-to-Many Relationships
इस Relationship में एक Entity के कई Entities से Connection होते हैं। उदाहरण के लिए — Teacher teaches many Students।
- “Many” Side की Table में “One” Side की Primary Key को Foreign Key के रूप में रखा जाता है।
7. Map Many-to-Many Relationships
यह Relationship सबसे Complex होती है। जैसे — Student ↔ Course (एक Student कई Courses ले सकता है और एक Course कई Students के लिए हो सकता है)।
- इसके लिए एक Intersection Table या Link Table बनाई जाती है।
- यह Table दोनों Entities की Primary Keys को Foreign Keys के रूप में रखती है।
8. Map Multivalued and Composite Attributes
अगर किसी Entity के पास एक ही Attribute के लिए कई Values हैं, जैसे — Student_Phone_Number, तो उस Attribute के लिए एक अलग Table बनाई जाती है।
- Multivalued Attributes के लिए Table में Foreign Key और Value Column होता है।
- Composite Attributes को अलग-अलग Columns में तोड़ा जाता है जैसे Address → Street, City, State।
9. Map Weak Entities and Identifying Owners
Weak Entity अपने आप में Independent नहीं होती, यह किसी दूसरी Entity पर निर्भर रहती है। उदाहरण के लिए — Dependent (Employee की Family Details)।
- Weak Entity की Table में Owner Entity की Primary Key को Foreign Key के रूप में शामिल किया जाता है।
- Weak Entity की अपनी Partial Key भी होती है।
10. Map ISA (Generalization/Specialization)
ISA Relationship तब उपयोग होती है जब एक Superclass के नीचे कई Subclasses होती हैं। उदाहरण के लिए — Employee एक Superclass है और उसके Subclasses हैं Manager और Clerk।
- हर Subclass के लिए अलग Table बनाते हैं जिसमें Superclass की Primary Key को Include करते हैं।
11. Final Review and Normalization
अंत में Database Structure की जाँच की जाती है ताकि कोई भी Redundancy या Anomaly न रह जाए। इसके लिए Normalization के Steps (1NF, 2NF, 3NF) Follow किए जाते हैं।
- हर Table में Atomic Values हों।
- Functional Dependencies का ध्