Chapter 2: Many-to-Many Quiz Discussion

In this discussion, OP claims that modeling an Actor collection is unnecessary while the responder claims that Actors still need to be queryable even when they’ve never been in a Movie. I agree with OP and not the responder for the following reason:

The Quiz is poorly worded and a poor choice of domain. Yes, the responder is correct in that given that an Actor can be in zero movies, there needs to be a place to contain the Actor. However, the example is malformed and a better example should be given. I could argue that you cannot be an Actor if you’ve never Acted in anything (as a common sense approach). Argue back that’s not the bounds of the question. I will retort that the example is poor because it leads us away from understanding the relationships.

Why would I ever embed an Actor in a movie? An Actor is unique and should be referenced always. Kevin Bacon is still Kevin Bacon and there should be a single source of truth for Kevin Bacon. Whereas, if I have a Cart with an Order and an Address for delivery, I can embed an Address there. I can still have an Address for a Credit Card or a User that has not yet been shipped to, so have an Address collection makes sense. Also, the value of embedding makes sense because historical shipment addresses per Order should be stable. I could also handle this by reference to an Address and allow the deletion of an Address to be (make invisible, but retain to allow old Orders to reference this Address). These are data model implementations.

Is this a better example? I’m not a course designer, so I admit this may not be the best modification. However, tripping me up on such a small thing when I think you want us to learn the big concepts is what’s at issue here. We’d all have figured out the need for an Actor collection where the query made explicit.

So, the problem is with the quiz design.

I lament the discussion being closed as I’d have preferred to have placed this comment there.