Special OFFER: 1st Enroll Flat 25% OFF OR 2nd Enroll Get 40% OFF | Use Coupon JTOFFER25

- Salesforce Blogs -

What Does Salesforce Use As Its Database?


Salesforce is the leading cloud vendor today due to an amazing range of services and offerings that have gained immense popularity during the last few years. In this post, we will majorly focus on the Salesforce database concepts in Salesforce.com. We will check how Salesforce is connected to multiple relational database systems available in the technology marketplace. All Salesforce databases could be similar to the objective but they are different in terms of naming and conventions. Here, we will see how we can create the data sources and how to establish or maintain a relationship among multiple data objects in Salesforce. Moving ahead, we will discuss the Salesforce database query and salesforce database architecture and Salesforce database class. Also, we will tell you, Is salesforce a database itself or it utilizes other databases to store or manage the voluminous data files. So, keep reading!

What is a database in Salesforce?

A Database in Salesforce is defined as the organized collection of objects where each object contains some information. Data is stored in the form of database tables for people, things, contacts, etc that are important for any project in the future. Each database has a set of certain rows and columns where information is stored in the form of fields and records. Take an example of the Employee table where information is stored in the form of different fields like employee ID, salary, designation, name, contact details, etc. Here, Employee is an object and all related information is taken as fields. 

Learn Salesforce in the Easiest Way

  • Learn from the videos
  • Learn anytime anywhere
  • Pocket-friendly mode of learning
  • Complimentary eBook available

Is Salesforce a Database?

It is a common debate “Is Salesforce a Database?” Salesforce is an easy to use database whose basics are easy to understand. If you know all about the Salesforce database, it is possible for you to better visualize the data in Salesforce. Before we jump on the Salesforce database architecture, it is necessary to learn about the Salesforce database first. 

Surprisingly, Salesforce uses Oracle to empower its databases. It may sound strange because Oracle and Salesforce are two direct competitors. Still, Salesforce never hesitates in using some of its best database technologies that can be beneficial for the Company.

Utilizing Oracle as a database, it not only improves the end product of the company but makes it more secure and reliable. If you really want to learn about the Salesforce database, you should learn the Oracle database first and also relational database in SQL.

One such important concept in Oracle is the Salesforce database class. Database classes can specify either you want to continue the execution or not if some error is encountered. You can also add one Boolean parameter to the Salesforce database class to make it more functional. The same task can be completed using DML statements but you are not free to keep a check on query execution.,

Another important concept is the Salesforce database architecture. It has the multi-tenancy architecture where clouds are used to share resources reliably and securely. The multitenant Salesforce database architecture has a huge impact on application delivery and the infrastructure. In simple words, we can say that Salesforce database architecture is highly similar to the architecture of relational database systems and easy to understand as well.

Types of Objects in Salesforce

Types of Objects in Salesforce

There are three types of objects in Salesforce –

Read: What Is Salesforce Chatter And Its Benefits?
  • Standard Objects – These types of objects are readily available and pre-defined in the Salesforce.
  • Custom Objects – These types of objects are created on special demands only as needed by the user. For each custom object, there are five standard fields that are necessary to understand when you are defining any custom objects. These are –
    • ID – this is a unique index allocate to each objection at the time of creation. It generally consists of 15 to 18 digit that is highly case sensitive like a password.
    • Name
    • Owner
    • Created Date / Created By
    • Last modified time / Last modified by
  • External Objects – These are custom objects only that are used to map the data outside the organization or external to your firm.

Apart from these three objects, there are a few objects that are available in API as well and we could access authorized objects only. The access to an object can be defined in multiple ways like user permissions, user ID, object configuration, access settings, data model, or any other factor that could be related to an object. Most of the objects from API have read-write access and a few of them are assigned read-only permissions.

Salesforce Training For Administrators & Developers

  • No cost for a Demo Class
  • Industry Expert as your Trainer
  • Available as per your schedule
  • Customer Support Available

How are Database Relations defined in the Salesforce?

Relationships in Salesforce are used to connect different objects together. There are multiple relationships that could be defined for the Salesforce on the child object. The child object could have complete access to the object defined in the parent section based on the relationship and permissions defined. 

Database Relations defined in the Salesforce

1). Many to one (n:1)

In this type of relationship, there is only one parent object and multiple child objects. For example, there are a number of metro cities in a country. It is further divided into four major categories as shown above in the hierarchy diagram –

  • Master-detail
  • Look Up (Loosely Coupled Relationship)
  • Self
  • Hierarchical

Let us discuss each of them one by one in detail below –

Master-Detail relationships

Here, we have one parent object and multiple child objects. For this type of relationship, you need to keep the following facts in mind –

  • The child record will be deleted automatically, once the master record is deleted.
  • Every time you wanted to create a child object then the reference of the parent object is needed.
  • There are no separate permissions or security settings defined for the child object but they are automatically inherited by the parent object.
  • The owner settings are automatically assigned to associated master objects.
  • On the page layout, there is a master-detail relationship is defined for the object.
  • The administrator will decide either child objects should be represented within the parent object or not.

This is possible to define the master-detail relationships on two or more custom objects. The relationship can be defined among one standard and one custom object but the custom object could not be fixed at the detail side. And the data for custom objects is displayed on the page layout. Keep in mind that master-detail relationships are not applicable to the object where User or Lead objects are defined as the master.

Lookup Relationship:

Read: What is Salesforce Architecture? Tutorial Guide for Beginners in 2020

This is one more category of one-to-many relationship but two objects will not put any effect on deletion or security. In this case,

  • Child objects are also independent. If we are deleting the parent object then the child object will not get deleted.
  • The separate settings could be defined for the child object.
  • If we will delete the parent object then the child object would still remain into the system.
  • In this case, the child object may or may not have a parent.


In this type of relationship, the object is self-referred. For example, add-on cards onto your credit card.

Hierarchical Relationship:

It is very much similar to the lookup relationship but it can be defined for user objects only. Further, you can use lookup fields to connect multiple users together. User objects may refer to themselves either directly or indirectly.

2). Many to Many Relationship

This type of relationship is used to model many-to-many relationships between any two objects. For many-to-many relationships, each record of one object could be further linked to multiple records from other objects and vice versa. In this case, we should create the junction object to help in creating many-to-many relationship fields and they are further connected to custom objects.

What is a Junction Object?

This object is needed to create many-to-many relationships that support two type of relationships master-detail and lookup relationships. They both are one-to-many relationships and to define many-to-many relationships in that case, we need a Junction Object.

How are many-to-many and one-to-many relationships different?

A one-to-many relationship is always defined on master-detail or lookup relationships while many-to-many relationships are defined using two master objects. For many-to-many relationships, each record of one object could be further linked to multiple records from other objects and vice versa. Lookup is one-to-many type relationship where two objects are connected but the child object will not get impacted once parent object is deleted. At the same time, in the case of a normal one-to-many relationship, when a master record is deleted, the child will also be deleted automatically.

Normal Database (Excel) vs. Relational Database (Salesforce.com)

In the case of normal databases, there is duplicate information can be used several times. But in the case of relational databases, there is always unique information is stored one instance can be used to refer multiple fields together. Generating a report in Excel is tedious and when it comes to Salesforce, reporting features are just overwhelming and enjoyed by developers.

Read: How can Learning Salesforce Developer Skills Lead you to your Dream Job?

Primary key vs. Foreign Key in the Salesforce database (Conceptual Knowledge)

A Primary key is defined as the column or a set of columns that can identify each record in the table uniquely. When a primary key is defined with the help of multiple columns, data from each row is assessed to check the uniqueness. Every time a column is defined as the unique key, there are some constraints to follow like column value should not be NULL and the data would always be UNIQUE.

At the same time, a Foreign key is defined as the column or a set of columns that is referring to the primary key of another table. This is not necessary that foreign key will always follow the primary key but the basic idea behind foreign key is that any column that is unique to identify that record. When we are learning the Salesforce as a database, this is necessary to get the basic knowledge of SOQL too. free salesforce demo

What is SOQL? When to use SOQL?

SOQL is Salesforce Object Query Language that is highly similar to SQL (Structured Query Language). With the help of SOQL, you can always search the organizational data wisely. It can be combined with APEX, Visualforce, or Force.com IDE too. While writing a query using SOQL, you should use SELECT command and a lot of other conditions too. Here, is the basic syntax on how to write SOQL query in Salesforce using SELECT command –

When to use SOQL

Now let us learn when should you use SOQL. The SOQL can be used when you have the basic idea of objects and related data. It can be used to retrieve data from one or multiple objects that are connected together based on requirements. It helps in getting the total count and sort queries as well. Further, it can be combined with SOSL (Salesforce Object Search Language) to search the organizational data when they are not sure about objects.

SOSL is programmed in such a way to work on the basis of the search index. To improve the performance of searching, you should combine SOQL and SOSL together because searching work is done better by SOSL as compared to the SOQL.

Salesforce Training For Administrators & Developers

  • Personalized Free Consultation
  • Access to Our Learning Management System
  • Access to Our Course Curriculum
  • Be a Part of Our Free Demo Class

Wrapping Up:

That’s all for the day. You have learned everything about the Salesforce database and related concepts too. To know more, you should join the Salesforce certification training program to get hands-on expertise in writing Salesforce Database Query and Salesforce database class. We wish you all the best!

Read: What is Salesforce Field Service Lightning and Why is it So Popular?

FaceBook Google+ LinkedIn Pinterest

    Janbask Training

    A dynamic, highly professional, and a global online training course provider committed to propelling the next generation of technology learners with a whole new way of training experience.


Trending Courses


  • AWS & Fundamentals of Linux
  • Amazon Simple Storage Service
  • Elastic Compute Cloud
  • Databases Overview & Amazon Route 53

Upcoming Class

-1 day 16 Oct 2021


  • Intro to DevOps
  • GIT and Maven
  • Jenkins & Ansible
  • Docker and Cloud Computing

Upcoming Class

5 days 22 Oct 2021

Data Science

  • Data Science Introduction
  • Hadoop and Spark Overview
  • Python & Intro to R Programming
  • Machine Learning

Upcoming Class

-1 day 16 Oct 2021


  • Architecture, HDFS & MapReduce
  • Unix Shell & Apache Pig Installation
  • HIVE Installation & User-Defined Functions
  • SQOOP & Hbase Installation

Upcoming Class

12 days 29 Oct 2021


  • Salesforce Configuration Introduction
  • Security & Automation Process
  • Sales & Service Cloud
  • Apex Programming, SOQL & SOSL

Upcoming Class

6 days 23 Oct 2021


  • Introduction and Software Testing
  • Software Test Life Cycle
  • Automation Testing and API Testing
  • Selenium framework development using Testing

Upcoming Class

-1 day 16 Oct 2021

Business Analyst

  • BA & Stakeholders Overview
  • BPMN, Requirement Elicitation
  • BA Tools & Design Documents
  • Enterprise Analysis, Agile & Scrum

Upcoming Class

5 days 22 Oct 2021

MS SQL Server

  • Introduction & Database Query
  • Programming, Indexes & System Functions
  • SSIS Package Development Procedures
  • SSRS Report Design

Upcoming Class

12 days 29 Oct 2021


  • Features of Python
  • Python Editors and IDEs
  • Data types and Variables
  • Python File Operation

Upcoming Class

6 days 23 Oct 2021

Artificial Intelligence

  • Components of AI
  • Categories of Machine Learning
  • Recurrent Neural Networks
  • Recurrent Neural Networks

Upcoming Class

-1 day 16 Oct 2021

Machine Learning

  • Introduction to Machine Learning & Python
  • Machine Learning: Supervised Learning
  • Machine Learning: Unsupervised Learning

Upcoming Class

33 days 19 Nov 2021


  • Introduction to Tableau Desktop
  • Data Transformation Methods
  • Configuring tableau server
  • Integration with R & Hadoop

Upcoming Class

5 days 22 Oct 2021

Search Posts


Receive Latest Materials and Offers on Salesforce Course