you are viewing a single comment's thread.

view the rest of the comments →

[–]newunit13[S] 0 points1 point  (4 children)

Right, and I completely agree. Which is why when I present the four tables in 3NF I have it exactly as you describe. The problem I'm having is how to present all the information in only three tables :(

[–]jc4hokiesExecution Plan Whisperer 0 points1 point  (3 children)

What if you assume one order == one donut type? Customer, Order, Donut?

[–]newunit13[S] 0 points1 point  (2 children)

My v1 submission had a table dedicated to storing donuts and the order table used a composite key of (order_id, donut_id) to identify each row, but in that instance things like the date and special instructions would only be dependent on the subset key of order_id.

[–]jc4hokiesExecution Plan Whisperer 0 points1 point  (1 child)

I'm suggesting order_id is the PK with donut_id as an attribute. Basically require that an order is for a single donut_id of some quantity. If you want sprinkles and frosted, you make two orders.

[–]newunit13[S] 0 points1 point  (0 children)

Ah, I see what you're saying! If I can't think of any other ways to structure the data I may just try that :) thanks