CS 221: Database Systems › Lesson 2 of 10

Entity-Relationship Modeling

Lesson 2 · OKSTEM College · AS Computer Science

Entity-Relationship Modeling

Study Entity-Relationship Modeling — complete the practice problems in your notebook.

Interactive Lab

Knowledge Check

In an ER diagram, a weak entity is one that:

All entities have attributes — weakness is about key dependency.
Correct — a weak entity's PK includes the parent's PK.
Weak entities can have many attributes.
The double diamond represents an identifying relationship, not the entity itself.
📖 Quick Recap

A weak entity depends on a strong entity for its identity — it has no primary key of its own (only a partial key).

📖 Quick Recap

Weakness is about key dependency, not attribute count.

📖 Quick Recap

A weak entity uses a double rectangle. The double diamond is the identifying relationship connecting it to its owner.

A many-to-many relationship between Students and Courses is typically resolved in a relational schema by:

One FK handles one-to-many, not many-to-many.
Correct — the junction table's composite PK eliminates the M:N relationship.
This violates first normal form (1NF) and makes queries very hard.
Massive redundancy and update anomalies — junction tables avoid this.
📖 Quick Recap

A single FK from Students to Courses would allow each student only one course (one-to-many). M:N requires a junction table.

📖 Quick Recap

Storing lists in a single column violates 1NF. Always use a junction table for M:N.

📖 Quick Recap

Duplication causes update anomalies: changing a student's name would require updating many rows.

← PreviousNext →