MySQL + SQL · Lesson 23
Entity, Relationship and Attributes
Entities, Attributes, Relationships
These three are the core of the ER model. This page explains each in depth, including attribute types and weak entities.
Types of Attributes
| Type | Meaning | Example |
|---|---|---|
| Simple | Cannot be divided | age |
| Composite | Can be divided | name → first, last |
| Multivalued | Many values | phone numbers |
| Derived | Calculated from others | age from DOB |
| Key | Unique identifier | roll_no |
Strong vs Weak Entity
- Strong entity: has its own key (Student).
- Weak entity: depends on a strong entity, no key of its own (e.g. Dependent of an Employee).
Summary
- Entities=objects, attributes=properties, relationships=links.
- Attribute types: simple, composite, multivalued, derived, key.
- Weak entities depend on strong entities.