DBMS 📂 Entity-Relationship (ER) Model · 4 of 5 31 min read

Designing an ER Diagram for a University Research Database

A complete, step-by-step walkthrough that turns a university research brief into a basic ER diagram. It identifies the Professor, Project, Graduate, and Department entities, derives five relationships — Manages, Works_On, the ternary Supervises, Runs, and Works_In (with a Time_Pct attribute) — and marks every key and participation constraint, finishing with the full assembled diagram and the design rationale.

Section 01

The Story — A Brief Lands on Your Desk

"Model Our Research Office"
The university's research office hands you a page of notes: professors, projects, grad students, departments, who manages what, who supervises whom. No tables, no keys — just English. Your job is to turn that prose into a precise ER diagram that a database can be built from.

A seasoned designer reads such a brief like a grammar exercise: nouns become entities, verbs become relationships, and describing words become attributes. Do that carefully, add the key and participation constraints, and the diagram almost draws itself.
📝
Notation We Will Use (Basic ER / Chen)

Rectangle = entity • Ellipse = attribute • Underlined ellipse = key • Diamond = relationship • Single line = partial participation • Double line = total participation • labels 1 / N / M = cardinality.


Section 02

Step 1 — Find the Entities and Attributes

Scanning the brief for the main "things", four nouns stand out. Each becomes an entity, and the describing words become its attributes.

EntityAttributesKey
PROFESSORName, Age, Rank, Specialtynone given → add Prof_ID
PROJECTPno, Sponsor, Start_Date, End_Date, BudgetPno
GRADUATEUID, Name, Age, Deg_ProgUID
DEPARTMENTDno, Dname, Main_OfficeDno
⚠️
Expert Note: Professor Has No Key

The brief lists a professor's name, age, rank, and specialty — but none of these is guaranteed unique (two professors can share a name). Every entity needs a primary key, so we introduce a surrogate key Prof_ID (an SSN or staff number would serve the same purpose). We will underline it as the key.

📦 The Four Entities and Their Attributes
PROFESSOR Prof_ID Name Rank Age Specialty PROJECT Pno Sponsor Budget Start_Dt End_Dt GRADUATE UID Name Age Deg_Prog DEPARTMENT Dno Dname Main_Office

Keys (amber, underlined) uniquely identify each entity. Note the introduced Prof_ID on PROFESSOR.


Section 03

Step 2 — Turn the Verbs Into Relationships

Each line of the brief that connects two (or three) entities is a relationship. Here is every requirement mapped to its relationship, ready to draw.

Brief says…RelationshipConnectsType
Each project has one PIManagesProfessor – Project1 : N
Projects have co-investigatorsWorks_OnProfessor – ProjectM : N
Grads work on projects, supervised by a profSupervisesProfessor – Graduate – Projectternary
Each dept has a chairmanRunsProfessor – Department1 : 1
Profs work in depts, with a time %Works_InProfessor – DepartmentM : N
💡
Notice: Two Relationships Can Share a Pair

Professor and Project are joined by two different relationships — Manages (principal investigator) and Works_On (co-investigators). They mean different things, so they are separate diamonds. The same pair, Professor–Department, also carries two: Runs and Works_In.


Section 04

Manages — The Principal Investigator (1:N)

"Each project is managed by one professor." So every project points to exactly one PI, while one professor may manage many projects — a 1:N relationship. Because every project must have a PI, the Project side has total participation (double line).

👑 Manages — one PI per project
PROFESSOR Manages PROJECT 1 N

Double line on PROJECT = total participation: no project may exist without a principal investigator.


Section 05

Works_On — The Co-Investigators (M:N)

"Each project is worked on by one or more professors… professors can work on multiple projects." Many professors, many projects — a classic M:N relationship. "One or more professors" makes the Project side total.

🤝 Works_On — many co-investigators, many projects
PROFESSOR Works_On PROJECT M N

Manages and Works_On look alike but differ in cardinality: a project has exactly one manager, but many co-investigators.


Section 06

Supervises — The Tricky Ternary Relationship

"Who Supervises Whom, on Which Project?"
A grad student works on the Robotics project under Prof. Rao, and on the AI project under Prof. Mehta — a different supervisor for each project. So "supervisor" is not a fact about the student alone, nor about the project alone; it depends on the combination of student and project. That is the signature of a ternary relationship linking three entities at once.

The relationship Supervises connects Professor, Graduate, and Project. The key constraint: each (Graduate, Project) pair has exactly one supervising professor.

🔹 Supervises — a single diamond joining three entities
PROFESSOR Supervises GRADUATE PROJECT 1 key constraint: (Graduate, Project) → exactly 1 Professor

Double line to PROJECT = total: every project has at least one grad working on it (and thus a supervisor). The "1" toward PROFESSOR captures the unique-supervisor key constraint.

⚠️
Don't Split It Into Two Binaries

Modelling "Graduate–works–Project" and "Professor–supervises–Graduate" as two separate binary relationships loses the link to the project — you could no longer tell which project a professor supervises a student on. The single ternary diamond preserves all three connections together.


Section 07

Runs — The Department Chairman (1:1)

"Departments have a professor (the chairman) who runs the department." Each department has exactly one chairman, and a professor chairs at most one department — a 1:1 relationship. Every department must have a chairman, so the Department side is total.

🏛️ Runs — one chairman per department
PROFESSOR Runs DEPARTMENT 1 1

Professor participation is partial (most professors are not chairs); Department participation is total (every department is run by someone).


Section 08

Works_In — With a Relationship Attribute (M:N)

"Professors work in one or more departments, and for each department they work in, a time percentage is associated." This is M:N — but the interesting part is Time_Pct: it belongs to neither Professor nor Department alone, but to the pairing. So it is a descriptive attribute on the relationship.

⏱️ Works_In — the Time_Pct attribute hangs off the diamond
PROFESSOR Works_In DEPARTMENT M N Time_Pct

Double line on PROFESSOR = total participation (every professor works in at least one department). Time_Pct describes this professor in this department.


Section 09

The Complete ER Diagram

Now assemble every piece. PROFESSOR sits at the centre because it touches everything; the five relationships radiate out to the other three entities. Watch it build up.

🎓 University Research Database — Full ER Diagram
PROFESSOR Prof_ID DEPARTMENT Dno PROJECT Pno GRADUATE UID Runs 1 1 Works_In Time_Pct M N Manages 1 N Works_On M N Supervises 1 green double lines = total participation • purple diamond = ternary • 1/N/M = cardinality

Five relationships on four entities: Runs (1:1), Manages (1:N), Works_On (M:N), Works_In (M:N + Time_Pct), and the ternary Supervises.


Section 10

Key & Participation Constraints at a Glance

The brief asked us to indicate key and participation constraints. Here they are, gathered in one place.

RelationshipDegreeCardinalityTotal participationKey constraint
ManagesBinary1 : NPROJECTEach project → 1 professor
Works_OnBinaryM : NPROJECT
SupervisesTernarysee notePROJECT(Graduate, Project) → 1 professor
RunsBinary1 : 1DEPARTMENTEach dept → 1 chairman
Works_InBinaryM : NPROFESSOR— (attribute: Time_Pct)
EntityPrimary Key
PROFESSORProf_ID (introduced)
PROJECTPno
GRADUATEUID
DEPARTMENTDno

Section 11

Design Decisions & Assumptions

🧮 The Judgement Calls Behind the Diagram
Prof key
No unique attribute was given for professors, so a surrogate key Prof_ID was introduced. Without it, PROFESSOR could not be a valid entity.
Ternary
Supervision depends on the (student, project) pair, so it is modelled as one ternary relationship rather than two binaries, preserving all three links.
Rel. attribute
Time_Pct sits on Works_In, not on Professor or Department, because it varies per professor-department pairing.
Two diamonds
Manages and Works_On are kept separate because PI and co-investigator are distinct roles with different cardinalities.
Participation
Total participation (double line) was added wherever the brief said "each / must / one or more": every project has a PI and co-investigators; every department has a chairman; every professor works in a department.

Section 12

Common Mistakes to Avoid

⚠️
Mistake 1 — Merging Manages and Works_On

They connect the same two entities but mean different things and have different cardinalities (1:N vs M:N). Collapsing them loses the "principal investigator" rule entirely.

⚠️
Mistake 2 — Putting Time_Pct on an entity

Placing Time_Pct on PROFESSOR implies one fixed percentage per professor, but the brief says it varies per department. A relationship attribute is the only correct home.

⚠️
Mistake 3 — Forgetting the professor's key

It is tempting to draw PROFESSOR with only the four given attributes. But with no underlined key, the entity cannot be identified — always check that every strong entity has exactly one key.


Section 13

Golden Rules for Designing From a Brief

🏆 ER Design — Non-Negotiable Rules
1
Nouns → entities, verbs → relationships, adjectives → attributes. Read the brief as a grammar exercise first.
2
Every strong entity needs exactly one underlined key. If the brief gives none, introduce a surrogate key and say so.
3
If a fact depends on three things at once, use a ternary relationship. Two binaries cannot capture a three-way dependency.
4
An attribute that depends on a pairing belongs on the relationship, never on either entity.
5
Words like "each", "must", and "one or more" signal total participation — draw a double line.
6
Keep distinct roles as distinct relationships. Principal investigator and co-investigator are different verbs, so different diamonds.