A company requires a data model where users can associate an Activity with multiple Contacts. Which relationship model best supports this requirement?
Trap 1: Lookup relationship
A standard lookup allows only one-to-many associations. If an activity is linked to a contact via a single lookup field, it cannot be linked to a second contact without creating additional, redundant lookup fields, which is inefficient and does not scale for dynamic association requirements.
Trap 2: Master-Detail relationship
Master-Detail is a one-to-many relationship. While it allows for parent-child hierarchies, it cannot resolve a many-to-many requirement on its own. Using a master-detail relationship would restrict the activity to exactly one contact, failing to meet the business need for multi-contact association.
Trap 3: Text field with IDs
Storing multiple IDs in a text field is a poor data modeling practice. It prevents the use of standard reporting features, prevents referential integrity, and makes queries significantly harder to write. It does not allow for efficient joins or lookups, making it an incorrect architectural choice.
- A
Lookup relationship
Why it fails: A standard lookup allows only one-to-many associations. If an activity is linked to a contact via a single lookup field, it cannot be linked to a second contact without creating additional, redundant lookup fields, which is inefficient and does not scale for dynamic association requirements.
- B
Junction Object
A junction object creates a many-to-many relationship by linking two master objects. By creating a custom object with two master-detail relationships, the organization can associate any number of Contacts with any number of Activities, providing the flexibility needed for complex tracking of interactions.
- C
Master-Detail relationship
Why it fails: Master-Detail is a one-to-many relationship. While it allows for parent-child hierarchies, it cannot resolve a many-to-many requirement on its own. Using a master-detail relationship would restrict the activity to exactly one contact, failing to meet the business need for multi-contact association.
- D
Text field with IDs
Why it fails: Storing multiple IDs in a text field is a poor data modeling practice. It prevents the use of standard reporting features, prevents referential integrity, and makes queries significantly harder to write. It does not allow for efficient joins or lookups, making it an incorrect architectural choice.