Given a scenario, determine the appropriate data model.
Different data models can be constructed for the same set of requirements. Because a data model impacts record accessibility and reporting, requirements need to be analysed to design correct objects and relationships.
A customer provides following requirements and requests for a suitable Salesforce data model:
As a first step, the entities involved in the requirements should be analysed. From the requirements, following entities can be identified:
Those entities can be designed as separate or combined Salesforce objects. To accurately track and distinguish data, three different objects are suggested for the given requirements.
For the Account entity the standard object Account can be extended with additional fields and relationships. For the Subscription and Payment entities new custom objects with fields and relationships are suggested.
After identifying objects, the relationships between those objects should be analysed. Because object relationships and relationship types impact record accessibility, this analysis should be based on visibility requirements.
From the requirements it can be determined that access to Accounts should be inherited by Subscriptions and Payments. Consequently, the three objects should be related hierarchically, and a relationship type that allows inheriting of access permissions should be chosen. Based on this, following relationships can be identified:
The entities and relationships identified during the analysis can be visualized in a entity-relationship model (ERM).
Implemented in Salesforce, relationships can be displayed as related lists. The master-detail relationship on Subscription can be displayed on the Account object, to display related Subscriptions. Similarly, the master-detail relationship on Payment can be displayed on the Subscription object, to display related Payments.