MySQL + SQL · Lesson 23
Entity, Relationship और Attributes
Entities, Attributes, Relationships
ये तीन ER model के core हैं। यह page हर एक को गहराई से समझाता है, attribute types और weak entities सहित।
Attributes के प्रकार
| Type | मतलब | Example |
|---|---|---|
| Simple | विभाजित नहीं हो सकता | age |
| Composite | विभाजित हो सकता है | name → first, last |
| Multivalued | कई values | phone numbers |
| Derived | दूसरों से calculate | DOB से age |
| Key | Unique identifier | roll_no |
Strong बनाम Weak Entity
- Strong entity: अपनी key होती है (Student)।
- Weak entity: strong entity पर निर्भर, अपनी key नहीं (जैसे Employee का Dependent)।
सारांश
- Entities=objects, attributes=properties, relationships=links।
- Attribute types: simple, composite, multivalued, derived, key।
- Weak entities strong entities पर निर्भर।