1.1ER model: entities, attributes, relationships
The idea
An ER diagram draws the real world as entities (things), their attributes (facts about them) and relationships (how they connect). It is a blueprint you later turn into tables.
Think of it like this: A floor plan before building a house: boxes for rooms, lines for doors.
Why it exists
GATE gives an ER diagram and asks how many tables or keys it produces, so you must read every symbol correctly.
How it works
- Rectangle = entity set; ellipse = attribute; diamond = relationship.
- Underlined attribute = key. Double ellipse = multivalued. Dashed ellipse = derived.
- The degree of a relationship is the number of entity sets it connects (binary = 2).
- Every entity set will become a table; the attributes become columns.
Worked example: Employee has ssn (key), name, and a multivalued attribute phone.
Tables: Employee(ssn, name) and a separate EmpPhone(ssn, phone), because a multivalued attribute cannot sit in one cell.
Now play with it
- →Switch the diagram below to 1:1, 1:N and M:N and read each side of the line aloud.
- →Notice what changes when you tick "total participation".
| Symbol | Meaning | Becomes in tables |
|---|---|---|
| Rectangle | strong entity set | a table |
| Double rectangle | weak entity set | a table including the owner key |
| Ellipse | attribute | a column |
| Underlined ellipse | key attribute | primary key |
| Double ellipse | multivalued attribute | a separate table (entity key + value) |
| Dashed ellipse | derived attribute | usually not stored |
| Diamond | relationship set | a foreign key or a table |
| Double diamond | identifying relationship of a weak entity | the owner key inside the weak table |
Composite attributes become several columns (street, city, pin).
Read it as: one B relates to at most one A and one A relates to many B. A double line means total participation (every entity must take part); a single line is partial. Here every B must take part.
Check yourself
A multivalued attribute of an entity is stored as
Exam notes (the dense version)
An entity is a thing with attributes; an entity set becomes a table. Attribute kinds: simple / composite, single-valued / multivalued, derived, and the key attribute (underlined). A relationship (diamond) connects entity sets and may carry its own attributes. Its degree is the number of entity sets involved.
Previous year questions: ER Model, Relational Model & Keys (9)
PYQs are grouped by topic, so this is the full set for ER Model, Relational Model & Keys; try the ones that match this subtopic. Open all 9 on the topic page.