Apex · Salesforce

Salesforce SOQL is not SQL

Salesforce SOQL query is not working same way as SQL server Data Base query. why?

  1. Salesforce using Multitenant Architecture – Many organization using single instance including data base but each org will have their own virtual hardwares.
  2. Salesforce using Force.com platform – It is metadata driven architecture.
  3. Query language directly integrated with Apex so no need to establish the connection to database.

Due to above approach – Force.com platform having governor limits to allow all organization to access the metadata and database without any issues.

What are the consideration?

  • No implicit joins means not supporting SQL traditional joins.
  • Object relationships must be defined upfront.
  • Object can have parent to child relationships.
  • Dynamic and Implicit joins can’t be permitted.
  • You can’t connection 2 object that does not have direct relationship – To accomplish this you may have to use wrapper class to connect 2 object data.

4-20-2018 9-46-41 AM


2 thoughts on “Salesforce SOQL is not SQL

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s