By Benjamin Washam

First, let’s break down that scary little acronym: ERD = Entity Relationship Diagram.

Still sound too techy? How about this: An Entity Relationship Diagram (ERD) is a chart that visually represents the relationships between database tables. In the case of Salesforce, this means the relationships between Objects such as Contacts, Accounts, Custom Objects, etc.


Think of it like the blueprint to your house – a blueprint may not tell you everything (carpet color, who has the second bedroom, etc.) but it does give you a sense of the structure – what rooms you have and how to get from one room to another through hallways and doors.

An ERD consists of two basic components: entities and relationships. Entities in Salesforce are Objects, and Relationships are lookup fields which link a record on one Object to a record on another Object.

Check out the NonProfit Starter Pack ERD Here (Compliments of Judi Sohn at Salesforce.org)

Why would I want to use an erd?

An Organization can find an ERD helpful in many situations:

  • You are implementing Salesforce for the first time and want to know where your data will live in Salesforce and how it will be connected.
  • You are updating your Salesforce data model to track new information (maybe you are beginning to manage programs instead of just fundraising in Salesforce) and want to make sure your new data is connected in the right ways.
  • You are a new System Administrator and need a view of the whole database to learn how to manage it.

Let’s look at a very basic example between two Objects, Contact and Account. Each entity is represented by a box with the Object name as the title. Below the title you can optionally add entity attributes, in this case, individual fields on the Object. The relationship between the two objects is represented by a line which corresponds to the Account lookup field on the Contact Object.

Diagram 1

Define the Relationship

What’s up with the crow’s foot, circle, and two hashes on the relationship line? So glad you asked! These special symbols at each end of a relationship line describe the nature of the relationship between the two objects. There is only one relationship, but it has two sides. For example, a boy and a girl may have one sibling relationship, however one is a brother to a sister, and the other is a sister to a brother. This is why you see two sets of symbols, one set on each side of the relationship line. These symbols represent the nature of that Object’s relationship to the other. Is it a required relationship? Can Object A be linked to more than one Object B or vice versa?

Here is a helpful key to ERD relationship symbols:


= Zero

 = One

= More than one (many)

 


Each relationship line will have a total of four symbols – two at each end. Within each pair of symbols, one corresponds to the
maximum number of related records allowed, the other to the minimum. The maximum is placed at the outside, closest to the related Object, the minimum is placed inside of the maximum on the line.

Let’s use Diagram 1 as an example. In the case of a required field such as the Account lookup field on a Contact, each Contact record must have a maximum of 1 related Account and a minimum of 1 related Account, so we use the vertical hash mark twice, one for the maximum, one for the minimum.

An Account can have a maximum of “many” related Contacts, and a minimum of zero, since an Account isn’t required to have a related Contact. In this case we put a crows foot on the outside of the line next to Contact for the maximum and a circle inside that to indicate the minimum of the relationship in that direction.

How To Get Started


If you are a current Salesforce user, Salesforce has already done the heavy lifting by creating a dynamic ERD for your Salesforce instance. It’s called a Schema, and if you are a System Administrator you can view it at any time in the Schema Builder (Setup> Build> Schema Builder).

Your Schema Builder may have hundreds of Objects and relationships, but the same principles we’ve just gone over still apply. If you don’t see much at first you may need to zoom out using the zoom controls on the right edge of the window, or drag around the full Schema using the map at the bottom right corner. Feel free to hide some or all of your Salesforce objects to clean up your ERD by deselecting them in the Objects tab of the left menu pane.

A few other ERD diagramming tools are also available on the web if you don’t have Salesforce or want to play around with a blank canvas:

Lucid Chart
Lucid Chart is free for the first 60 entities and has built in ERD shapes and symbols.
https://www.lucidchart.com

Draw.io
Draw.io is a totally free diagramming product with many options for ERD diagrams.
https://www.draw.io

Related Articles

 

Benjamin Washam

Benjamin Washam