Building Applications with Force.com and VisualForce (DEV401) (三):Application Essential:Building Your Data Model
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的更多相关文章
- 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 ...
- 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. ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- Building Applications with Force.com and VisualForce (DEV401) (二五):Visualforce Controller
Dev401-026:Visualforce Pages: Visualforce Controller Module Objectives1.Identify the functionality ...
- 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 ...
随机推荐
- C++走向远洋——68(十六周、文件)
*/ * Copyright (c) 2016,烟台大学计算机与控制工程学院 * All rights reserved. * 文件名:text.cpp * 作者:常轩 * 微信公众号:Worldhe ...
- webpack中打包拷贝静态文件CopyWebpackPlugin插件
copyWebpackPlugin: 作用:用于webpack打包时拷贝文件的插件包 安装:npm install copyWebpackPlugin@版本号 使用:// copy custom st ...
- Docker实战之Kafka集群
1. 概述 Apache Kafka 是一个快速.可扩展的.高吞吐.可容错的分布式发布订阅消息系统.其具有高吞吐量.内置分区.支持数据副本和容错的特性,适合在大规模消息处理场景中使用. 笔者之前在物联 ...
- python大佬养成计划----HTML网页设计(序列)
序列化标签 1.有序标签--ol和li 有序列表标签是<ol>,是一个双标签.在每一个列表项目前要使用<li>标签.<ol>标签的形式是带有前后顺序之分的编号.如果 ...
- 线程(Thread)的四种停止方式
1.正常的程序启动,停止 2.使用退出标记,一般程序在run()方法后,线程会正常结束.但是有一些伺服线程还在运行,他们运行时间较长,只有当外部条件满足时,他们才会停止.实现如下: public cl ...
- 关于独立部署web项目到tomcat服务器详情
步骤: 1.设置端口号:找到所解压的tomcat的目录下中的conf文件夹,再用editPlus打开conf文件夹中的server.xml文件,tomcat初始端口为8005,8080,8009,如果 ...
- linux命令行界面如何安装图形化界面
linux命令行界面如何安装图形化界面 目录 问题描述 解决方案 安装包 测试是否安装成功 如何卸载图形化界面 遭遇问题 问题描述 当我们在安装Linux系统时,我们一开始可能安装的是非图形界面的系统 ...
- racket学习-call/cc (let/cc)
Drracket continuation 文中使用let/cc代替call/cc Racket文档中,let/cc说明为: (let/cc k body ...+) Equivalent to (c ...
- 单链表反转的原理和python代码实现
链表是一种基础的数据结构,也是算法学习的重中之重.其中单链表反转是一个经常会被考察到的知识点. 单链表反转是将一个给定顺序的单链表通过算法转为逆序排列,尽管听起来很简单,但要通过算法实现也并不是非常容 ...
- 数据结构 - Collection接口
简介 Collection继承自Iterable,Collection接口是Java集合两大分支中的一支,Queue.List.Set都是Collection的扩展:集合大类分为了Collection ...