Unit 2 - Database Essentials
Unit 2 - Database Essentials
The Salesforce database is not just a repository of customer and company data, but also
offers numerous custom services. These services include, the capability of building custom
apps, pages, components, etc. This is possible because of the Salesforce database’s well-
designed multilayer architecture.
The Salesforce architecture is built of stacked levels and offers a flexible and adaptable
interface that is easy and efficient to use.
1. Objects
2. Fields and
3. Records
The database in Salesforce is relational in structure, which means that the data is stored in
tables.
In Salesforce, these tables are called Objects. The tables or objects comprise columns that
indicate the type and rows that are the records.
The entries are called fields or data records. Multiple objects can be associated with a single
record, and these objects are interconnected using unique identifiers.
Multiple objects in the Salesforce database are interrelated through different types of
relationships, often set by the user.
• Standard Objects are pre-created by the Salesforce platform and may be used directly.
Details like leads, accounts, contacts, etc., are examples of standard objects.
• Custom Objects can be created by the user according to their needs that are driven by
business processes or functionalities
• External Objects can be created to map data stored outside the organization.
Various combinations of these types of objects allow businesses to manage different kinds
of data and make the platform flexible for their use.
The column of an object is the field. Each field indicates a specific type of data.
• Standard Fields and common to all objects on Salesforce that are prebuilt and provided
on the platform.
Examples:
• Custom Fields: Fields that are created by the user on standard and custom objects on the
database of Salesforce.
3. Salesforce Database Records
Records are the actual entries of the tables in the database of Salesforce. Records can be
created for leads, tasks, opportunities, notes, and accounts. Records are the data that are
stored.
Records may be of numerous types depending on the business processes, nature of users,
customers and admin. These records run and link different business processes and collate
the activities that include users, customers, and admins.
1. Keys
Keys are unique identifiers of the columns in the tables of the database. Each table also has
a unique key. So, the unique key can be used to link to other tables. The column keys and
the table keys produce a massive web of tables that are interconnected. This
interconnection allows for exceptional functionalities like tracking, measuring and utilizing
vast volumes of customer data.
The Salesforce database, like all relational databases, uses two kinds of keys to identify the
columns in the tables:
Relationships are defined to connect the tables (Objects) in Salesforce with each other.
Object relationships allow the creation of intricate dynamic webs of data. Salesforce also
allows the setting up of Object relationships with custom objects. Standard objects come
with prebuilt share relationships.
• Lookup relationships: Wherein related objects are “looked up” from within the object
itself.
• Master-Detail relationships: This connects a master object with a detail object, the
former controlling the latter. Thus, a customer contact master object can be connected to
a customer sales detail object. Deleting the detail object won’t delete the master object,
but deleting the contact master object will delete the sales detail object as well.
• Many to One
• Many to Many
• External lookup
• Self
• Hierarchical
3. Schema Builder
Schema builder is a tool used to visualize, understand, and edit data models. It can help
create fields and objects. It provides a clear visualization of the data flow within the system.
Some of the efficient tools offered by Salesforce for importing and exporting data are:
• The data import wizard allows the import of objects such as contacts, accounts, and
leads into custom tables (objects) in the database of Salesforce. Over 50,000 records can
be simultaneously imported using this tool. An easy-to-use interface is provided to specify
configuration parameters, field mappings, and data sources. Field mappings support
mapping the field names in the imported file with the field names of the Salesforce
database.
• The Data Loader can import over 5 million records at a time. The advantage of the data
loader is that the data can be of any type, and the source can also be any database
connection. GUI and command line windows are used to operate this tool
• The data Export Service is a browser service that can be accessed using a setup
menu. This tool can be used to export data weekly or monthly.
• The data Loader is a separately installable tool that works on GUI and command line
prompts to automate the export process.