← 🧱 ER Model, Relational Model & Keys
Subtopic 1 of 5

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

  1. Rectangle = entity set; ellipse = attribute; diamond = relationship.
  2. Underlined attribute = key. Double ellipse = multivalued. Dashed ellipse = derived.
  3. The degree of a relationship is the number of entity sets it connects (binary = 2).
  4. 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".
SymbolMeaningBecomes in tables
Rectanglestrong entity seta table
Double rectangleweak entity seta table including the owner key
Ellipseattributea column
Underlined ellipsekey attributeprimary key
Double ellipsemultivalued attributea separate table (entity key + value)
Dashed ellipsederived attributeusually not stored
Diamondrelationship seta foreign key or a table
Double diamondidentifying relationship of a weak entitythe owner key inside the weak table

Composite attributes become several columns (street, city, pin).

ABR1Nab

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

Remember: Entity → table, attribute → column, multivalued attribute → its own table.
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.