Free tutorials & notes in Hindi & English · Clean code examples 🧰 Free PDF & Image Tools →
MySQL + SQL · Lesson 136

ER Diagram Symbols

In this lesson: All ER diagram symbols explained — entity, weak entity, attribute types, relationship, cardinality — with pictures.

Why symbols matter

An ER diagram uses standard shapes so anyone can read a database design at a glance. Each symbol has a fixed meaning — a rectangle is always an entity, an oval always an attribute. Learning these few symbols lets you read and draw any ER diagram.

💡 Rectangle = entity, Oval = attribute, Diamond = relationship, Lines = connections.

Rectangle — entity

  • Rectangle — a normal entity (Student, Book, Order).
  • Double rectangle — a weak entity, which needs another entity to be identified (like a Dependent linked to an Employee).

Entities become tables when the diagram is built into a database.

Oval — attribute

  • Oval — a normal attribute (name, age).
  • Underlined oval — a key attribute (the primary key, like roll).
  • Double oval — a multivalued attribute (can hold many, like phone numbers).
  • Dashed oval — a derived attribute (calculated, like age from date of birth).

Attributes become columns in the final tables.

Diamond — relationship

  • Diamond — a relationship between entities (Student "enrolls" Course).
  • Double diamond — an identifying relationship, linking a weak entity to its owner.

Relationships become foreign keys or link tables in the database.

Lines and cardinality

Lines connect entities to their attributes and to relationships. On relationship lines, cardinality is marked to show how many connect:

  • 1 : 1 — one-to-one.
  • 1 : N — one-to-many.
  • M : N — many-to-many.

Some diagrams use crow's-foot notation (a forked line) instead of letters.

Special shapes

SymbolMeaning
RectangleEntity
Double rectangleWeak entity
OvalAttribute
Underlined ovalKey attribute
Double ovalMultivalued attribute
Dashed ovalDerived attribute
DiamondRelationship

Common mistakes

  • Mixing up oval and diamond. Oval is an attribute; diamond is a relationship.
  • Forgetting to underline the key. The key attribute must be underlined.
  • Ignoring cardinality labels. Without them the relationship type is unclear.
  • Using a single rectangle for a weak entity. Weak entities use a double rectangle.

Summary

  • ER diagrams use fixed symbols anyone can read.
  • Rectangle = entity; double rectangle = weak entity.
  • Oval = attribute; underlined = key, double = multivalued, dashed = derived.
  • Diamond = relationship; double diamond = identifying.
  • Lines carry cardinality (1:1, 1:N, M:N).

Next, understand the pieces in the ER model, or see them combined in ER diagram examples.

Frequently Asked Questions

What are the main symbols in an ER diagram?
The core symbols are: a rectangle for an entity, an oval for an attribute, a diamond for a relationship, and lines connecting them. Special shapes like double rectangles and dashed ovals show weak entities and derived attributes.
What does a rectangle mean in an ER diagram?
A rectangle represents an entity — a real-world thing like Student or Book. A double rectangle means a weak entity, which cannot be identified without another entity.
What does an oval mean in an ER diagram?
An oval represents an attribute (a property of an entity), like name or age. An underlined oval is a key attribute, a double oval is multivalued, and a dashed oval is a derived attribute.
What does a diamond mean in an ER diagram?
A diamond represents a relationship between entities, such as "enrolls" between Student and Course. A double diamond shows an identifying relationship for a weak entity.
How is cardinality shown in an ER diagram?
Cardinality is shown on the connecting lines, often with labels like 1, N or M, or with crow's-foot notation. It tells you whether a relationship is one-to-one, one-to-many, or many-to-many.
🔗

Share this topic with a friend

यह topic किसी दोस्त को भेजें

Found it useful? Send it to a classmate learning the same thing.

अच्छा लगा? जो दोस्त यही सीख रहा है, उसे भेज दीजिए।

Next topicNormalization in DBMS with 1NF, 2NF and 3NF Examples Your progress: 136 / 151 (90%) · Lesson 137 / 151 Continue →

How was this lesson?

Your feedback helps us make the content better.

Write a review or suggestion (optional)

After approval, your name and city may appear publicly with your review. Please do not write your email or phone number.

▶ CodingEasily on YouTube

Learn with video lessons in easy Hindi

Featured video: RDBMS Part 3 – Class XI Commerce IT

▶ Subscribe – it’s free