Dev 401-003:Application Essential:Building Your Data Model

Object Relationships
1.Link two objects
- Parent to child
- One to Many
2.Two main Types:
- Look up
- Master- Detail
3.Two special types:
- Self
- Many to many

Lookkup Relationships
1.Loosely coupled
- Child field value may be optional
- No cascade delete
- Independent ownership & sharing
2. Maximum 25 look-up relationships per child

Master-Detail Relationships
1.Tightly coupled
- child field value is always required
- Cascade delete
- Inherited ownership & sharing
2.Maximum 2 master relationships per detail object

Let's Compare... Look-up and Master-detail Relationships
Look-up Relationships                     Master Relationships
Up to 25 allowed per object              Up to 2 allowed per object
Parent is not a required field           Parent filed on child is required
No impact on security and access         Access to parent determines access to children
Can be multiple layers deep            Can only be one layer deep(a child of one master-detail relationship cannot be the parent of another)
Look-up field is not required              Look-up field on page layout is required
Both relationship types look almost the same on a page layout:both include a look-up field for the one side and related list for the many side.

Relationships and Reporting
Relation Type RelationTypeStandard Report TypesReport Type Category
LookupObject by itselt object with first lookupBased on the object
Object with second lookup
Object with third lookup
Master-DetalObject by itselt object with first lookupMaster object
Object with second lookup
Object with third lookup
Many-To-ManyPrimary master object by itself Secondary       Primary master object and
master object by itselfSecondary master object
Primary master object with junction
Object and secondary master object
Secondary master object with junction
object and primary master object

Exercise 2-3:Creating lookup Relationships
1.Goal:
- Create lookup relationships to connect objects to one another.
2.Scenario:
- Universal Containers needs to be able to see which Job Applications are related to each Position. Additionally, they need 
to see which Hiring Managers are related to each Position.
3.Tasks:
- Create a lookup relationship between Job Application and Position
- Create a lookup relationship between Position and Hiring Manager.

Self Relationships
1.A self relationship is a lookup relationship to the same object.
- Example: it is possible to create a lookup relationship from Position to Position
2. the User object has a special type of lookup relationship:the hierarchy relationship.For example, a hierarchy 
relationship allows developers to create a manager field on the User object to relate another user.

Many-to-many Relationships
1.Allow for the relationship of two object in a many-to-many fashion
- Candidates may apply for many position by submitting a job application fro each position
- A position may have many candidates apply.
- Implementing a many-to-many relation requires a third junction object.

Junction Objects
1.When modeling a many-to-many relation, you use a junction object to connect the two objects you want to relate to each 
other.
2.A junction object is a custom object with two master-detail relationships.
3.When  creating a junction object, consider the following:
- Name the object with a label that indicates its purpose.
- Use the auto-number data type.

Exercise 2-5:Creating a Custom Junction Object.
1.Goal:
- Create a Many-to-Many Relationship between Position and Job Posting Site.
2.Scenario:
- Universal Containers will have many positions advertised on various job posting sites. They want to be able to connect and 
manage those records within Salesforce.
3.Tasks:
- Create a new custom junction object.
- Create the master-detail relationships of Job Posting with Position and Job Posting Site.

Module Review
1.What is a custom object?
2.List examples of custom field types.
3.True or false:if a field is set to "universally required," users will be required to populate it when loading data 
through the API.
4.List the for types of custom relationships that can be built in the force.com platform and describe the differences 
between them.

Building Applications with Force.com and VisualForce (DEV401) (三):Application Essential:Building Your Data Model的更多相关文章

  1. Building Applications with Force.com and VisualForce (DEV401) (二) : Application Essentials:Designing Application on the Force.com Platform

    Dev 401-002:Application Essentials:Designing Application on the Force.com Platform Course Objectives ...

  2. Building Applications with Force.com and VisualForce (DEV401) (四):Building Your user Interface

    Dev 401-004:Application essential:Building Your user Interface: Module Agenda1.Custom Applications2. ...

  3. Building Applications with Force.com and VisualForce(Dev401)(十):Designing Applications for Multiple Users: Building Business Processes that You Want

    Dev401-011: Building Business Processes that You Want Course Objectives1.Describe the capabilities o ...

  4. Building Applications with Force.com and VisualForce(Dev401)(十八):Visualforce Pages: Introduction to Visualforce

    Dev401-020:Visualforce Pages: Introduction to Visualforce Course Objectives1.Understand the benefits ...

  5. Building Applications with Force.com and VisualForce (DEV401) (二十):Visualforce Pages: Visualforce Componets (Tags)

    Dev401-021:Visualforce Pages: Visualforce Componets (Tags) Module Agenda1.Tag Basics2.Tag Bindings T ...

  6. Building Applications with Force.com and VisualForce(Dev401)(十九):Visualforce Pages: Visualforce Componets (Tags)

    Dev401-020:Visualforce Pages: Visualforce Componets (Tags) Module Agenda1.Tag Basics2.Tag Bindings T ...

  7. Building Applications with Force.com and VisualForce(Dev401)(七):Designing Applications for Multiple users:Managing your users' experience I

    Dev 401-007 Designing Applications for Multiple users: Managing your users' experience part 1 Module ...

  8. Building Applications with Force.com and VisualForce (DEV401) (二五):Visualforce Controller

    Dev401-026:Visualforce Pages: Visualforce Controller   Module Objectives1.Identify the functionality ...

  9. Building Applications with Force.com and VisualForce (DEV401) (二一):Visualforce Componets (Tags) Library Part 1

    Dev401-022:Visualforce Pages: Visualforce Componets (Tags) Library Part 1 Module Objectives1.List ke ...

随机推荐

  1. Gradle的依赖方式——Lombok在Gradle中的正确配置姿势

    写过java的都知道,lombok几乎在项目中处于不可或缺的一部分,但是lombok在Gradle的项目中配置并非人人都知道. 很多人在项目依赖中直接这样写 1 compile "org.p ...

  2. 微软亚洲研究院开源图数据查询语言LIKQ

    ​ 近日,微软亚洲研究院通过GitHub 平台开源图数据查询语言LIKQ (Language-Integrated Knowledge Query).LIKQ是基于分布式大规模图数据处理引擎Graph ...

  3. MySQL多表查询、事务、DCL:内含mysql如果忘记密码解决方案

    MySQL多表查询.事务.DCL 多表查询 * 查询语法: select 列名列表 from 表名列表 where.... * 准备sql # 创建部门表 CREATE TABLE dept( id ...

  4. kafka知识整理

    title: kafka知识整理 date: 2019-06-18 10:59:46 categories: MQ tags: kafka --- 转载自:https://www.cnblogs.co ...

  5. 前端每日实战:60# 视频演示如何用纯 CSS 创作一块乐高积木

    效果预览 按下右侧的"点击预览"按钮可以在当前页面预览,点击链接可以全屏预览. https://codepen.io/comehope/pen/qKKqrv 可交互视频 此视频是可 ...

  6. 对HTML语义化的一些理解和记录

    什么是HTML语义化 说HTML语义化就要先说说HTML到底负责的什么?下面摘自维基百科: 超文本标记语言(英语:HyperText Markup Language,简称:HTML)是一种用于创建网页 ...

  7. 零基础JavaScript编码(一)

    任务目的 JavaScript初体验 初步明白JavaScript的简单基本语法,如变量.函数 初步了解JavaScript的事件是什么 初步了解JavaScript中的DOM是什么 任务描述 参考以 ...

  8. 关于使用map存放数据乱序”问题“

    今天做项目中遇到了一个比较低级的错误,如果没注意将会变的更麻烦... 其实吧,也不难,要求就是将list中的值转为map后,再顺序输出map中的值,list的顺序怎样,加入到map的顺序也应怎样,不能 ...

  9. XCTF---easyjava的WriteUp

    一.题目来源     题目来源:XCTF题库安卓区easyjava     题目下载链接:下载地址 二.解题过程     1.将该apk安装进夜神模拟器中,发现有一个输入框和一个按钮,随便输入信息,点 ...

  10. python学习-练习题兔子生长问题巩固

    有一对兔子,一个月之后成熟,成熟之后每个月会生出一对兔子,理想状态下兔子不会死,请问n个月后有多少兔子? 分析:第一个月:1 第二个月:1 第三个月:2 第四个月:3 第五个月:5 第六个月:8 从前 ...