Data Modeling

Data Model

Salesforce的数据模型类似于数据库对数据的组织形式

In Salesforce, we think about database tables as objects, we think about columns as fields, and rows as records.

Objects

Salesforce supports several different types of objects. There are standard objects, custom objects, external objects, platform events, and BigObjects. In this module, we focus on the two most common types of objects: standard and custom.

Standard objects are objects that are included with Salesforce. Common business objects like Account, Contact, Lead, and Opportunity are all standard objects.

Custom objects are objects that you create to store information that’s specific to your company or industry.

Objects are containers for your information, but they also give you special functionality. For example, when you create a custom object, the platform automatically builds things like the page layout for the user interface.

Fields

Every standard and custom object has fields attached to it. Let’s get familiar with the different types of fields.

Field Type What is it? Can I get an example?
Identity A 15-character, case-sensitive field that’s automatically generated for every record. You can find a record’s ID in its URL. An account ID looks like 0015000000Gv7qJ.
System Read-only fields that provide information about a record from the system, like when the record was created or when it was last changed. CreatedDate, LastModifiedById, and LastModifiedDate.
Name All records need names so you can distinguish between them. You can use text names or auto-numbered names that automatically increment every time you create a record. A contact’s name can be Julie Bean. A support case’s name can be CA-1024.
Custom Fields you create on standard or custom objects are called custom fields. You can create a custom field on the Contact object to store your contacts’ birthdays.

Identity, system, and name fields are standard on every object in Salesforce. Each standard object also comes with a set of prebuilt, standard fields. You can customize standard objects by adding custom fields, and you can add custom fields to your custom objects.

Object Relationships

objects relationships是关联两个object的一种手段,Salesforce自带一些标准的关系,如Contact就是一种标准的关系;此外,还可以定制自己的relationship;定制关系有三种类型:

Lookup Relationships、Master-Detail Relationships、Hierarchical relationships

Lookup Relationships

In our Account to Contact example above, the relationship between the two objects is a lookup relationship. A lookup relationship essentially links two objects together so that you can “look up” one object from the related items on another object.

Lookup relationships can be one-to-one or one-to-many. The Account to Contact relationship is one-to-many because a single account can have many related contacts. For our DreamHouse scenario, you could create a one-to-one relationship between the Property object and a Home Seller object.

Master-Detail Relationships

While lookup relationships are fairly casual, master-detail relationships are a bit tighter. In this type of relationship, one object is the master and another is the detail. The master object controls certain behaviors of the detail object, like who can view the detail’s data.

differentiate between lookup and master-detail relationships

Typically, you use lookup relationships when objects are only related in some cases. Sometimes a contact is associated with a specific account, but sometimes it’s just a contact. Objects in lookup relationships usually work as stand-alone objects and have their own tabs in the user interface.

In a master-detail relationship, the detail object doesn’t work as a stand-alone. It’s highly dependent on the master. In fact, if a record on the master object is deleted, all its related detail records are deleted as well. When you’re creating master-detail relationships, you always create the relationship field on the detail object.

Hierarchical relationships

Hierarchical relationships are a special type of lookup relationship. The main difference between the two is that hierarchical relationships are only available on the User object. You can use them for things like creating management chains between users.

Schema Builder

schema builder可以通过可视化的类图查看数据模型,查看定制的objects以及各objects之间的relationships;

schema builder还可以建立新的objects,为已存在的objects添加新的fields;具体操作在Elements操作栏中;

时间: 2024-10-10 07:38:33

Data Modeling的相关文章

Data Modeling for MVC Applications

原文: Data Modeling for MVC Applications 模型-视图-控制器(MVC)是程序开发的主流范式.我们来看看Dojo为开发MVC的应用提供了些什么.我们将学习如何利用Dojo的stores对象与为模型提供的状态对象,以及如何在模型级别之上建立模型化的视图与控制器. MVC应用的数据模型 MVC是应用开发的主流范式.MVC为使代码有组织性,易管理性对关注点做了分层.Dojo是重度基于MVC法则的,并为构建MVC架构的应用提供了强大的帮助.一个设计良好的MVC应用的基石

EA Data Modeling 显示别名设置

1.设置 2.效果 

MySQL vs. MongoDB: Choosing a Data Management Solution

原文地址:http://www.javacodegeeks.com/2015/07/mysql-vs-mongodb.html 1. Introduction It would be fair to say that as IT professionals we are living in the golden age of data management era. As our software systems become more complex and more distributed,

Qlikview Data Modeling---Concatenation

这篇Blog主要介绍下通过Concatenation(串联) 事实表来避免loops 和 synthetic keys: Qlikview里的建模通常都是是很简单的.通常我们只要重新命名一些子段的名字来防止或者建立表之间的自动关联. 但是有时候我们只是通过简单的重命名是解决不了问题的.例如我们有多个事实表和其他的表有多个关联,这样通常会产生可怕的 synthetic key,更可怕的是会产生data loop(闭环).Qlikview的data modeling千万不能有data loop.

Core Data 学习:轻量级版本迁移(Lightweight Migration)

什么时候需要版本迁移呢? 答案很简单,什么时候改变数据模型,什么时候就需要版本迁移. Core Data支持对数据模型(data model)改变的管理.改变数据模型将造成该数据模型与之前的持久化存储(stores)不兼容,而出现错误.所以,如果我们改变了自己的数据模型,就需要将原有的持久化存储中的数据转移到新的模型版本,这一过程就称为版本迁移(migration). 为什么需要进行版本迁移? 当我们发布应用之后,再添加一些新的特性,我们将需要更新持久化存储.在我们开发的过程中,很好操作,删除A

My journey introducing the data build tool (dbt) in project’s analytical stacks

转自:https://www.lantrns.co/my-journey-introducing-the-data-build-tool-dbt-in-projects-analytical-stacks/ Not sure I remember how, but I had the good luck a few weeks ago to stumble upon posts from Tristan Handy where he mentioned a tool his team built

数据挖掘——Data competition: From 0 to 1: Part I

Data competition: From 0 to 1: Part I 1. Data competition Introduction 2. Example: Credit Fraud Detector EDA(Exploratory Data Analysis) Why taking log transformation of continuous variables? Outliers Detection Unbalance Metrics Resampling Cross-valid

MAC下安装与配置MySQL

1.先到mysql官网上下载dmg格式安装包,进行安装. 2.安装完后,命别名: www.2cto.com alias mysql=/usr/local/mysql/bin/mysql aliasmysqladmin=/usr/local/mysql/bin/mysqladmin 给root创建密码: /usr/local/mysql/bin/mysqladmin -u root password root 使用终端来打开或关闭mysql: sudo /Library/StartupItems/

走进MongoDB(二)

本文从以下四个方面对mongodb进行介绍 一.聚合操作(aggregate operation) 二.文本搜索(text search) 三.数据模型 (DATA MODELS) 四.数据库安全(security) 一.聚合操作 组合多个数据记录,对分组数据记录进行多种操作,最终返回一个单一的结果 实现方式:聚合管道.map-reduce.单用途聚合方法 1.聚合管道 聚合管道是基于数据处理管道模型上的.数据记录经过 多个阶段的管道 最终被转换为聚合结果集. 最基本的过滤管道提供了改变数据集输