ER data model एक प्रकार का data model है, जहाँ ER का full form है Entity Relationship एवं Entity का मतलब object (or real world thing) है | किसी भी Entity की properties ही table में attribute लिखा जाता है, जैसे student एक Entity है , जिसका name, age, gender आदि properties हो सकते है |
उदाहरण –
Name | Age | Gender |
Suneeta | 22 | Female |
Lakmi | 20 | Female |
- यह एक high-level data model है।
- इस model से conceptual design तैयार होता है database के लिए।
Component of ER Diagram
1. Entity
एक entity कोई भी object, class, व्यक्ति or स्थान हो सकता है। ER diagram में, entity को rectangle से represent करते है।
उदहारण – student एक entity है।
- Weak Entity – ये एक प्रकार की entity ही है जो किसी दूसरी entity पर निर्भर रहती है। इस entity के पास कोई भी key attribute नहीं होता है।
- Weak Entity को double rectangle से represent करते है।
2. Attribute
Types of Attribute
- Key Attribute
- Composite Attribute
- Derived Attribute
- Multivalued Attribute
Key Attribute
Key Attribute का उपयोग किसी Entity की मुख्य विशेषताओं को दर्शाने के लिए किया जाता है। यह primary key को represent करती है।
- Key Attribute को ellipse से दर्शाते है underline text के साथ।
Composite Attribute
यह attribute एक से अधिक अन्य attribute से मिलके बना होता है, जो संयुक्त रूप से कम्पोजिट attribute कहलाता है।
- Composite attribute को ellipse से denote करते है।
- Example – student का full_name एक composite attribute है जो first_name एवं last_name से मिलके बना हुआ है।
Derived Attribute
ऐसा attribute जो की दूसरे attribute की मदद से संभव है derived attribute कहते है जैसे student की age उसकी birth के बिना नहीं निकली जा सकती है, ऐसे एट्रिब्यूट है derived कहलाते है।
- derived attribute को dashed ellipse से दर्शाते है।
Multivalued Attribute
ऐसा attribute जिसकी एक से values हो muti-valued एट्रिब्यूट कहते है, जैसे student का मोबाइल नंबर जो एक से अधिक हो सकते है, तो यहाँ पे मोबाइल नंबर muti-valued attribute है।
3. Relationship
एक entity का दूसरे entity से सम्बन्ध को ही relationship कहते है, Diamond or rhombus से relationship को दर्शाया जाता है। (represent किया जाता है)
उदहारण – teacher और student के मध्य पढ़ने/पढ़ाने का रिलेशनशिप (relationship) है।
Entity Relationship Diagrams
ये Diagrams Entity, Attribute एवं उनके बीच रिलेशनशिप दर्शाते है, अच्छे से समझने के लिए नीचे उदाहरण दिया गया है –

Cardinality

Example - WordPress Database ER Model
