Data Modeling in Salesforce

Data Modeling in Salesforce

In this blog post, I will explain some important points to remember when you are choosing an appropriate data model in Salesforce and I will try to explain them with the help of examples. Whenever we are setting up an application in Salesforce, we need to setup a data model which refers to the use of objects and fields.It can consist of standard and custom objects, fields and different relationship types.

Data Modeling in Salesforce:

Standard Objects: Standard objects include Account, Contact, Cases and Opportunity are provided by Salesforce.

Custom Objects: Custom objects can be used to store information specific to a company’s requirement such as properties.

Schema Builder: Schema Builder allows viewing and setting up the data model quickly and efficiently.

Relationships: Different relationship types can be used to set up the data model,such as lookup and master-detail.

Salesforce Data Model:

Standard Objects: standard objects such as Account,Contact, Lead and opportunity are included in Salesforce by default. These are the objects which are provided by Salesforce out-of-the-box.

Custom objects: custom objects can be created to store specific information that cannot be stored in standard object. If your company needs to store specific information related to Patient Insurance, you can create a Custom object.

Standard fields: Standard fields such as Name, ID and CreatedDate are created by default. Whenever you create a custom object, these are the standard fields that are added by salesforce. Every standard object in Salesforce also contains the same field.

Custom fields: Create custom fields of different data types to store additional information.If you want to store information related Employee’s Birth Date and Address, you can create custom fields in order to store this data.

Lookup relationships: This is a loosely coupled relationship between two objects. It is a one-to-many relationship. In the case of lookup relationship, when you delete a parent,child records will not get deleted.

Master-Detail Relationships: This is a tightly coupled relationship between two objects. In the master-detail relationship, when you delete the parent, child record will automatically get deleted and also the sharing setting of the child records are controlled by the parent record.

Many-to-Many relationships: In order to create a many-to-many relationship between two objects, we create a Junction object.

Data Model: Create objects, fields and relationships to represent the data in the database.

Data Model:

  • A data model is a way to represent data in a database consisting of tables with columns and rows.
  • Objects represent tables, fields represent columns and records represent rows in Salesforce.
  • A data model can represent a collection of objects and fields in an app and how they are related to one another in an app.
  • Specific relationships can be defined among the objects in an app to create the data model.
  • The data model can be examined by navigating to ‘Schema Builder’ in Setup.


Choosing a Data Model:

  • A data model is typically created for a custom application in Salesforce.
  • It can consist of standard and custom objects, custom fields and relationships.
  • Different relationships like lookup, master-detail and many-to-many relationships can be utilized in a data model.
  • You can use Schema builder to view the data model as well as to create objects, fields and relationships.

How to access the Data Model?

In Salesforce, Object Manager in Setup and Schema Builder are tools used to create Data models. Although you can use Schema Builder to configure objects, fields and relationships, it has certain limitations.

Object Manager still serves as the complete and most comprehensive tool for managing data models involving both standard and custom objects.

Object Manager:
In order to access Object Manager, go to Setup and click on the Object Manager tab in the navigation bar.
Enter Object Manager in the Quick Find text box.

Schema Builder:
Schema Builder can be accessed from Object Manager, or it can be found by entering “Schema Builder” in the Quick Find text box in Setup.
It is a tool used for creating and viewing data models or customizing them according to requirements.

Abilities of Schema Builder:

  • It provides the ability to view the relationship structure and fields that are available for each object in Salesforce.
  • It allows identifying the relationships between the objects and creating new custom objects and fields to customize and design the data model.
  • You can use Schema builder to create objects, fields and relationships also.
  • It provides the ability to add custom objects, lookup relationships, master-detail relationships and all custom fields except Geolocation.
  • Custom fields added using Schema Builder are not added automatically to page layouts.
  • Roll-up summary fields can be added to an object if it is the master in a relationship.
  • Objects can be hidden on the canvas, but fields cannnot be hidden.

This Post Has 15 Comments

  1. Miyoko Hartson

    Interesting write-up. Had been did you got all the data from…

  2. Darleen Hamilton

    I am typically to blogging i really appreciate your posts. Your content has really peaks my interest. My goal is to bookmark your blog and maintain checking for first time information.

  3. Hi there, just became alert to your blog through Google, and found that it’s really informative. I am gonna watch out for brussels. I’ll be grateful if you continue this in future. Numerous people will be benefited from your writing. Cheers!

  4. Erna Briagas

    I’m impressed, I must say. Truly rarely do I encounter a weblog that’s both educative and entertaining, and let me tell you, you have hit the nail around the head. Your concept is outstanding; the problem is an element that insufficient persons are speaking intelligently about. We are delighted we stumbled across this around my look for something concerning this.

  5. This design is incredible! You certainly know how to keep a reader amused. Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Wonderful job. I really enjoyed what you had to say, and more than that, how you presented it. Too cool!|

  6. Alisha

    Hello! This is my 1st comment here so I just wanted to give a quick shout out and tell you I truly enjoy reading your blog posts.
    Can you recommend any other blogs/websites/forums that cover the same topics?


  7. feed

    Howdy, i read your blog occasionally and i own a similar one and i was just curious if you get a lot of spam remarks? If so how do you reduce it, any plugin or anything you can advise? I get so much lately it’s driving me crazy so any assistance is very much appreciated.|

  8. feed

    What’s up everyone, it’s my first go to see at this web site, and article is really fruitful for me, keep up posting these articles.|

  9. Michal Gilner

    some sleeping bags are waterproof and weatherproof too, they are nice for camping outside the house**

  10. thefeed

    Hey there! Would you mind if I share your blog with my facebook group? There’s a lot of people that I think would really enjoy your content. Please let me know. Cheers|

  11. the feed

    It is appropriate time to make some plans for the future and it is time to be happy. I’ve read this post and if I could I desire to suggest you few interesting things or suggestions. Perhaps you could write next articles referring to this article. I wish to read even more things about it!|

  12. Inger Tippey

    I really like seeing websites that understand the value of providing a quality useful resource for free. A hard-hitting post.

  13. Reta Krog

    It’s not the case that reader must be completely agreed with author’s views about article. So this is what happened with me, anyways it’s a good effort, I appreciate it. Thanks

  14. Jame Bombard

    How can I change the settings in Thunderbird so that I choose the e-mail address used to forward blog posts?

Leave a Reply