The Salesforce data model
Salesforce abstracts the underlying data structure in its database for a given customer org by providing a faux RDBMS view of the objects within it. For example, take the diagram you find when viewing the Sales Cloud ERM at https://architect.salesforce.com/diagrams/template-gallery/sales-cloud-overview-data-model:
Figure 2.1 – The Salesforce Sales Cloud data model
As we can see, a contact record will have an AccountId
represented as a lookup (which would be a foreign key in RDBMS terminology). Take this example for Account and Contact from Schema Builder for a brand-new Developer Edition org:
Figure 2.2 – Account and Contact represented in Schema Builder in a brand-new Developer Edition org
See for Yourself
Feel free to sign up for a (completely free) Developer Edition Salesforce org at https://developer.salesforce.com/signup in order to follow along with the examples in this book, including...