0

Simple question: I have a many-to-many relationship between sales reps and contacts:

SalesRep <<---------------->> Contact

For each contact, each sales rep can specify if he is a favorite (BOOL isFavorite) and keep some notes (NSString *notes).

The way this is currently modeled is with an interim entity:

SalesRep <------>> Relationship <<-------> Contact

where the additional information is kept in two attributes of the Relationship entity.

Is there a way around the new Relationship entity, just modeling this with additional attributes? How about if the notes field is omitted? Is there maybe a solution with parent / child entities?

4
  • You've modelled it correctly, as far as I'm concerned. Is there any reason why you're looking for a different solution?
    – paulbailey
    Nov 9, 2012 at 11:51
  • I want to simplify. How about, if the notes field does not exist? It seems a bit much to create an entity just for a single bit flag.
    – Mundi
    Nov 9, 2012 at 11:52
  • the idea is good as relationships might get more complicated in the future.
    – jackslash
    Nov 9, 2012 at 12:18
  • Exactly. I think you're already at the cleanest solution, which will easily allow you to store more information about the relationship should you need to.
    – paulbailey
    Nov 9, 2012 at 12:23

1 Answer 1

0

Apparently, there is no real opportunity for simplification.
This is viewed as the cleanest solution.

Thanks guys.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.