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 ...
随机推荐
- 用RecyclerView做一个小清新的Gallery效果 - Ryan Lee的博客
一.简介 RecyclerView现在已经是越来越强大,且不说已经被大家用到滚瓜烂熟的代替ListView的基础功能,现在RecyclerView还可以取代ViewPager实现Banner效果,当然 ...
- C++扬帆远航——4(百钱百鸡)
/* * Copyright (c) 2016,烟台大学计算机与控制工程学院 * All rights reserved. * 文件名:baiji.cpp * 作者:常轩 * 完成日期:2016年3月 ...
- ODI学习资料
ODI12.2.1.4入门指南:https://docs.oracle.com/en/middleware/fusion-middleware/data-integrator/12.2.1.4/ind ...
- 【2020Python修炼记3】初识Python,你需要知道哪些(一)
一.编程语言简介 机器语言 计算机能直接理解的就是二进制指令,所以机器语言就是直接用二进制编程,这意味着机器语言是直接操作硬件的,因此机器语言属于低级语言, 此处的低级指的是底层.贴近计算机硬件(贴近 ...
- c++获取屏幕大小
API: 要取得屏幕大小,可以用下面几个函数: # include <windows.h>int cx = GetSystemMetrics( SM_CXFULLSCREEN ); int ...
- leetcode 209 3 滑动窗口
class Solution { public: int minSubArrayLen(int s, vector<int>& nums) { ,r=-; //由于数组是[]区间, ...
- 2019-2020-3 20174318张致豪《网络对抗技术》Exp2 后门原理与实践
Exp2 后门原理与实践 前期准备 一.实验目标与基础知识 1.1 实践目标 使用netcat获取主机操作Shell,cron启动 使用socat获取主机操作Shell,任务计划启动 使用MSF m ...
- 一,kubeadm初始化k8s集群
docker安装 wget https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/docker-ce.repo yum inst ...
- Docker Compose 文件讲解
Docker Compose 是什么 官方文档: Docker Compose是定义和运行多容器 Docker 应用程序的工具.使用"Compose",您可以使用 YAML 文件来 ...
- Android NDK JNI 入门笔记-day04-NDK实现Hash算法
* Android NDK JNI 入门笔记目录 * 开头 前面的学习,我们已经掌握了 NDK 开发的必备知识. 下一步就要多实践,通过创造问题并解决问题,来增加熟练度,提升经验. 日常开发中,经常会 ...