Blog

Salesforce Basic Data Model

Objects :

Relational tables are used by the Salesforce Platform to store data. These table records include both user-generated data and information on the platform’s internal structure. In Salesforce, these relational tables are known as objects.

Standard Objects :

Salesforce provides various objects which have been considered standard. Account, Contact, Lead, and Opportunity are examples of common business objects.

Some Important Standard Objects

  1. Account – Account: Represents a company or individual engaged in commerce.
  2. Contact – Individual who is a member of the Account.
  3. Opportunities – Represents a transaction between Account and Company.
  4. Case – This will represent a problem or issue.

Custom Objects :

You can develop custom objects to store data that is particular to your business or sector.

Example Scenario :

To keep the books published and the information on their sales for each month, for instance, a book publishing company could develop a custom object. Thus, these objects serve as a repository for company-specific data. Along with the standard fields offered by Salesforce, custom fields can also be added to the custom objects.

External Objects :

While external objects are identical to custom objects, their record data is kept outside of your Salesforce organization.

Example Scenario :

Consider the scenario that you have data that is maintained in an enterprise resource planning (ERP) system. You can use external objects to access the data in real-time via web service callouts rather than duplicating it inside your organization.

Salesforce Basic Data Model

Salesforce Object Relationships

  1. Lookup Relationships
  2. Master-Detail Relationship
  3. Many-to-Many Relationships
  4. Self Relationship
  5. External Relationships
  6. Hierarchical Relationships

Lookup Relationships –

Salesforce’s lookup relationship connects two objects but has no impact on deletion or security. Lookup fields, unlike master-detail fields, are not always necessary.

Real-time Scenario :

Salesforce Basic Data Model

Book and Publication Company in lookup relation.

The relation between the Book and the Publication company could be as shown in the diagram above. However, books need not always be in connection with the publishing company.

Master-Detail Relationships –

It is also said to be a Parent-Child relationship. In a parent-child connection, the master object in a Salesforce master-detail relationship controls specific actions of the detail object.

Real-time Scenario :

Salesforce Basic Data Model

Book and Author in Master detail relation.

The link between the Book and the Author could be as shown in the diagram above. There must be an author for every book. There is no such thing as a book without an author.

Many-to-Many Relationships (Junction Object) –

Each record of one item can be linked to numerous records from another object according to a many-to-many relationship.

Real-time Scenario :

Salesforce Basic Data Model

Junction Object

Consider a Student application on the course process where you have a course available and a student object. As it is a requirement for students to apply to multiple course applications, a standard parent-child relationship would not work. You need a junction object, called something along the lines of ‘Student Application’, to allow many students to apply to multiple courses.

Self Relationships –

A lookup relationship to the same object is known as a self-relationship.

Real-time Scenario :

Salesforce Basic Data Model

As an illustration, we have an option on the account form called Parent Account that enables us to select any account to act as the parent account of an already-existing account.

External Relationships (Junction Object) –

Standard lookup relationships, which employ the 18-character Salesforce record IDs to link related records together, are supported for external objects. On the other hand, the record IDs are frequently absent from data that is kept outside of your Salesforce org.

External lookups and indirect lookups are thus two unique forms of lookup relationships that are possible for external objects.

Hierarchical Relationships –

This special connection, which is intended to establish a hierarchy of users, can only be applied to user objects. It might be used, for instance, to make a lookup field for the user object that lists the person’s manager.

Salesforce Basic Data Model

As an illustration, the diagram shows the relationship between the users in a hierarchical form.