Your Cart
Loading

ER Diagram Exam Question Workbook: Online Store, 10-Point Rubric (Database Design Lesson 4)

On Sale
$2.00
$2.00
Added to cart

This exam question brings Lessons 1–3 together. Keys, one-to-many, and many-to-many all show up in one scenario. You draw the diagram yourself, then grade it out of 10 using an instructor's rubric.


The problem

An online store sells products to customers. Customers place orders, orders contain products, and the store records the quantity and price charged for each product on an order. Draw the ER diagram: name every entity and its primary key, show each relationship with its cardinality and minimums, and place every attribute. Then explain why the price is stored in two places.


What's inside

  • A blank drawing page: do the full question on paper before you look at the answer.
  • A step-by-step solution: find the entities in the wording, read each relationship both ways, and spot the junction entity (OrderLine) from the clue "for every product on an order."
  • The finished ER diagram: in crow's foot notation, with every primary key, foreign key and minimum labeled.
  • Why the price appears twice: a tested query raises a product's list price and shows that old order totals stay correct only when the price charged is stored on the order line.
  • The most common wrong answer: putting ProductID in the order table. A tested script shows the database rejecting a second product on the same order.
  • A 10-point rubric: the points for each part, including the minimums and the junction entity, so you can score yourself honestly.


Details: 12 pages and 2 tested queries. The setup script is in the appendix, and it runs in a new, empty SQLite or PostgreSQL database.


Already have the free sample? This problem is also Problem 15 in the free Normalization & ERD Practice Pack sample, with its answer and rubric. Buy this workbook if you want the drawing page, the step-by-step walkthrough, the crow's foot diagram and the tested queries that prove the design. If the sample's answer is enough for you, save your $2.


Next in the series: Database Design Lesson 5, 7 Design Mistakes.

You will get a PDF (65KB) file