Chapter:-3 (Hindi)
3. ER / EER to Relational Model Mapping
🔁 ER / EER to Relational Model Mapping
ER और EER diagrams conceptual models होते हैं।
Database में implement करने के लिए इन्हें Relational Model (tables) में convert किया जाता है।
🔹 ER to Relational Mapping Steps
Step 1: Strong Entity
- प्रत्येक strong entity → एक table
- Key attribute → Primary Key
Example:
Student(ID, Name, Age)
Step 2: Weak Entity
- Weak entity → table
- Partial key + owner entity का PK → Composite Primary Key
Step 3: Relationships
- 1:1 → एक table का PK दूसरे में FK
- 1:N → “One” side का PK “Many” side में FK
- M:N → New table (Composite PK)
Step 4: Multivalued Attribute
- Separate table बनाया जाता है
- Attribute + PK = Composite Key
Step 5: Derived Attribute
- Generally store नहीं किया जाता
🔷 EER to Relational Mapping
EER में Specialization, Generalization और Inheritance शामिल होते हैं।
Mapping Strategies:
- Top-Down
- Single Table
- Separate Tables
- Mixed Strategy