Data Model, Objects, and Relationships in Salesforce

|
| By Webner

A data model is defined as a method to represent tables in the database in an understandable human language. Tables in the database are used to understand the relationships among different objects.

From a database point of view, a table and object are similar, fields present in the object are considered as a column of the table, and a single row of this table is considered as a record. Data Model is a collection of objects.

Types of objects supported are:

  • Standard Objects: The objects that are created by salesforce, and they are used by the salesforce CRM. Objects which are inbuilt and regular to CRM are already present in the salesforce.
  • Standard Objects: The objects that are created by salesforce, and they are used by the salesforce CRM. Objects which are inbuilt and regular to CRM are already present in the salesforce.
    • Identity: It is considered as an individual identifier that is generated automatically for each record, and it is 15 to 18 characters long.
    • System: This field is considered as a read-only field because this field provides read-only information. It provides information like who created the record and who edited the record.
    • Name: This is the only mandatory field for custom objects which is filled by text or auto number.
    • Custom: Any field apart from the above-mentioned fields is called a custom domain, and this field has a custom data type associated with it.
  • External Objects: For using the external data in the salesforce, it is possible through the external objects. We use certain object relationships for the implementation of external objects.

Salesforce supports two types of objects relationships are:

  • Lookup: When two objects are connected through a Lookup relationship, then fields of one object can be accessed by another object. Lookup relationships are implemented in two ways:
    1. one-to-one
    2. one-to-many.

    Objects which have Lookup relationships are sometimes connected, and sometimes they are not connected.

  • Master-Detail Relationship: When two objects are connected through a Master-Detail relationship, one object will be the master, and the other object acts as its detail. In other words, we can say that one object is a parent and the other object is a child.

Leave a Reply

Your email address will not be published. Required fields are marked *