Chapter 17 — Quiz

13 questions. Answers at the bottom.


Multiple choice

Q1. An entity in ER modeling is roughly: - A) A column - B) A thing your system tracks (becomes a table) - C) A relationship - D) A constraint

Q2. To find entities in requirements, look for: - A) Verbs - B) Nouns - C) Adjectives - D) Numbers

Q3. To find relationships, look for: - A) Nouns - B) Verbs connecting nouns - C) Keys - D) Types

Q4. A customer can have several phone numbers. This is a(n): - A) Derived attribute - B) Composite attribute - C) Multi-valued attribute (→ separate table) - D) Key attribute

Q5. "One customer has many orders; each order has one customer" is: - A) 1:1 - B) 1:N - C) M:N - D) Self-referencing

Q6. "An order contains many products; a product appears in many orders" is: - A) 1:1 - B) 1:N - C) M:N (needs a junction table) - D) Weak

Q7. An M:N relationship is implemented with: - A) A single foreign key - B) A junction (associative) table - C) An array column - D) Nothing — it can't be done

Q8. "Every order must have a customer" describes: - A) Partial participation - B) Total (mandatory) participation - C) M:N cardinality - D) A derived attribute

Q9. Total participation typically maps to which on the foreign key? - A) Nullable - B) NOT NULL - C) UNIQUE - D) DEFAULT

Q10. A weak entity (e.g., order_items): - A) Has no attributes - B) Can't be identified by its own attributes alone; depends on an owner (composite key) - C) Is always 1:1 - D) Cannot have a primary key


True/False

Q11. A derived attribute (like total_spent) must always be stored as a column. (True / False)

Q12. You should design the conceptual ER model before writing CREATE TABLE. (True / False)


Short answer

Q13. A students table stores enrolled courses as 'MATH101, CS200' in one column. Identify the modeling error and describe the correct design.

---

Answer key

Q1 — B. An entity is a tracked thing → (roughly) a table.

Q2 — B. Entities are nouns.

Q3 — B. Relationships are verbs between nouns.

Q4 — C. Multi-valued → becomes its own table (Chapter 18).

Q5 — B. One-to-many.

Q6 — C. Many-to-many → junction table.

Q7 — B. A junction table resolves M:N (Mercado's order_items).

Q8 — B. "Must have" = total/mandatory participation.

Q9 — B. Total participation → NOT NULL foreign key.

Q10 — B. Weak entities borrow the owner's key (composite PK).

Q11 — False. Derived attributes are often not stored (compute in a query); store them only when performance requires it (denormalization, Ch. 20).

Q12 — True. Model conceptually first; jumping to DDL bakes in shapes you'll regret.

Q13. It's an unmodeled many-to-many (a student takes many courses; a course has many students) crammed into one column. Correct design: a students table, a courses table, and an enrollments junction table with (student_id, course_id) (plus attributes like grade/semester). This restores queryability, integrity (FKs), and avoids parsing comma-separated text.

Scoring: 11–13 you think like a designer; 8–10 review cardinality and M:N; below 8, redo Exercises A–B and the critiques.