Top Banner
Introduction to the Data Model Developers Reid Carlberg: salesforce.com @ReidCarlberg @ForceDotComLabs
28

Introduction to the Data Model

May 11, 2015

Download

Business

Salesforce

Force.com provides a powerful data persistence layer. It lets you create database tables and adds a lot of features right out of the box like triggers, relationships, default values, validation rules, reporting, and search. This session covers how to create your first database and use these powerful features to easily build a rich application.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Introduction to the Data Model

Introduction to the Data ModelDevelopers

Reid Carlberg: salesforce.com@ReidCarlberg@ForceDotComLabs

Page 2: Introduction to the Data Model

Safe HarborSafe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services.

The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of intellectual property and other litigation, risks associated with possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year ended January 31, 2010. This documents and others are available on the SEC Filings section of the Investor Information section of our Web site.

Any unreleased services or features referenced in this or other press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.

Page 3: Introduction to the Data Model

Ask your questions in the Dreamforce Org!

Page 4: Introduction to the Data Model

Who Has…

No or very little force.com experience?

Modified a standard object?

Created a custom object?

Developed a complex app on the platform?

Professional experience writing SQL?

Page 5: Introduction to the Data Model

Force.com: More Than a Repository

Store

Manage

Understand

Secure

UI

Search

Scale

DR

Page 6: Introduction to the Data Model

Today’s Goals

Create objects, fields and relationships.

Leverage relationship, summary and formula fields.

Connect to security, analytics, UI, API and other

services.

Next steps!

Page 7: Introduction to the Data Model

The Lingo (Old New)

Tables Objects

Columns Fields

Keys Ids, External Ids

Foreign Keys Relationships

Row Record

Page 8: Introduction to the Data Model

Standard Objects

Users, Accounts, Contacts, Opportunities, Cases, etc.

Page 9: Introduction to the Data Model

Standard Objects Are Well Documented

http://developer.force.com

Page 10: Introduction to the Data Model

Custom Objects

Page 11: Introduction to the Data Model

The Joy of Data Types

Number, Text, Long Text, Date, Checkbox

CurrencyPercentagePhoneEmailURL

Lookup FieldsMaster Detail Fields

Roll Up SummaryRich Text

Page 12: Introduction to the Data Model

Today’s Demo App: Project Management

Project__c

Milestone__c

Action__c

User

No suffix: Standard; “__c”, custom; “__r”, relationship; “Feed” & “__Feed”; “Share” & “__Share”; “History” & “__History”; “Tag” & “__Tag”

Page 13: Introduction to the Data Model

Let’s Build an App!

Page 14: Introduction to the Data Model

Common Fields: Identity, Ownership and Audit

ID* GUID

Name Text or Autonumber

Owner Lookup to User

CreatedBy* Lookup to User

CreatedOn* Date time

LastModifiedBy* Lookup to User

LastModifiedOn* Date time

*100% managed by Force.com

Page 15: Introduction to the Data Model

Relationships Are Easy!

Project__c

Milestone__c

Action__c

UserCustomMaster Detail

Standard Lookup

Custom Lookup

“Milestone__c”

“Project__c”

“OwnerId”

“User__c”

Page 16: Introduction to the Data Model

Many to Many Relationships Are Easy

Project__cAccount

AccountProjectJoin__c

Twin Custom Master Detail

Page 17: Introduction to the Data Model

Roll Ups, Formulas, External IDs

Page 18: Introduction to the Data Model

Relationships Are Powerful

Project__c

Milestone__c

Action__c

User

“Show me Mary’sAssignment”

5 Open Tasks

30 Open Tasks

Page 19: Introduction to the Data Model

Formulas

Spreadsheet like syntax

Field default value

Standalone & combination formulas

Evaluated at access (view, API, report, etc)

Page 20: Introduction to the Data Model

External IDs

Great for integration / migration.

Required for the UPSERT operation.

Facilitate automatic foreign key resolution.

Page 21: Introduction to the Data Model

Search, Analytics & Security

Page 22: Introduction to the Data Model

Misc Topics

API: SOAP, REST, Bulk, Metadata

SOQL and the Force.com IDE

Record types

Custom settings

Recycle bins: record, field & object

Page 23: Introduction to the Data Model

Keys to Success

Know your problem domain

Model smart…

…but don’t over normalize

Use native force.com features

Be security aware

Page 24: Introduction to the Data Model

Next Steps

Get a Developer Edition– http://developer.force.com

Attend Another Intro Session!– Workflow – Today 2:15p

– Force.com Code - Apex – Today 3:45p

– Force.com Pages - Visualforce – Today 5:15p

Chatter Resources

Twitter Resources– @ReidCarlberg, @ForceDotComLabs

Page 25: Introduction to the Data Model

Introduction to the Data Model

Page 26: Introduction to the Data Model

D I S C O V E R

Visit the Developer Training and Support Booth in Force.com Zone

Discover

Developer

Learning Paths

Developer training, certification and support resources

S U C C E S SFind us in the Partner Demo Area of

Force.com Zone 2nd Floor Moscone West

that help you achieve

Learn about Developer

Certifications

Page 27: Introduction to the Data Model

Remember. . .

Check Chatter for additional session information

Get your developer Workbooks and Cheat Sheets in

the Force.com Zone

Visit for more information related

to this topicDon’t forget the survey!

Page 28: Introduction to the Data Model

How Could Dreamforce Be Better? Tell Us!

Log in to the Dreamforce app to submit

surveys for the sessions you attendedUse the

Dreamforce Mobile app to submit

surveysEvery session survey you submit is

a chance to win an iPod nano!

OR