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. CSS 技巧汇总

    CSS 选择符优先级 !important 声明>内联样式(style)>id 选择符(#id)>类选择符(.class)=伪类选择符(:hover )=属性选择符([attr] ) ...

  2. PHP数组知识点整理

    */ * Copyright (c) 2016,烟台大学计算机与控制工程学院 * All rights reserved. * 文件名:text.cpp * 作者:常轩 * 微信公众号:Worldhe ...

  3. CountDownLatch源码探究 (JDK 1.8)

    CountDownLatch能够实现让线程等待某个计数器倒数到零的功能,之前对它的了解也仅仅是简单的使用,对于其内部如何实现线程等待却不是很了解,最好的办法就是通过看源码来了解底层的实现细节.Coun ...

  4. 泰拉瑞亚Linux主机打造指南

    最近玩了泰拉瑞亚,一个2D版的我的世界,但苦于steam的联机太过不靠谱,经常会出现和朋友之间联机失败的问题,所以我把服务器放到了部署我博客的服务器,这样就可以通过IP直接让好友加入游戏了! 首先是购 ...

  5. 成长日记(2) Java面向对象

    本篇主要是记录自己在学习路上的笔记,如果有哪里记错了请大家直接指出 面向对象的概念 *人为抽象的一种编程模型 *面向过程 代码集中 难以维护 *类:对事物 算法 逻辑 概念等的抽象 理解成 模板 图纸 ...

  6. 07.深入浅出 Spring Boot - 数据访问之Mybatis(附代码下载)

    MyBatis 在Spring Boot应用非常广,非常强大的一个半自动的ORM框架. 代码下载:https://github.com/Jackson0714/study-spring-boot.gi ...

  7. Vue方式自动打开浏览器配置

    Vue方式自动打开浏览器配置 1. 通过 package.json 配置项目 // 必须是符合规范的json语法 "vue": { "devServer": { ...

  8. vue2.0中eventBus实现兄弟组件通讯

    我们知道,在vue中父子组件的通讯是通过props和自定义事件搞定的,简单那的非父子组件通讯用bus(一个空的Vue实例),针对中大型的项目会选择vuex,然而小项目的话,便捷的解决方案就是event ...

  9. Python专题——五分钟带你了解map、reduce和filter

    本文始发于个人公众号:TechFlow,原创不易,求个关注 今天是Python专题第6篇文章,给大家介绍的是Python当中三个非常神奇的方法:map.reduce和filter. 不知道大家看到ma ...

  10. ES6—get 与 set

    在类里面可以去定义一些getter和setter,getter可以得到一些东西的方法,setter可以设置东西 class Chef{ constructor(food){ this.food = f ...