Skip to main content

Understanding Salesforce’s Data Architecture

  • Chapter
  • First Online:
Developing Data Migrations and Integrations with Salesforce
  • 761 Accesses

Abstract

People often view Salesforce’s data engine as a relational database with a web service layer wrapped around it for performing CRUD operations, but this view is wrong—or at least incomplete. As we learned in Chapter 1, it’s perfectly normal (and good) to denormalize our data strategically for a needed performance boost. Salesforce takes this a step further. It not only denormalizes the data, it also encourage developers to continue this pattern of denormalization. The question, then, is how far from Edger Codd’s vision can we go and still consider our data model normalized? I would say that Salesforce is way past that line. I searched quite a bit for an official statement from Salesforce stating that it’s not a relational database, and this is the best I could find:

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Anonymous, “The Force.com Multitenant Architecture,” https://developer.salesforce.com/page/Multi_Tenant_Architecture , March 31, 2016.

  2. 2.

    Recently, Salesforce’s relationship with Oracle hasn’t been great, and there are rumors that Salesforce is moving away from Oracle. If this is the case, Salesforce will probably build their own database engine. Regardless, the RDBMS is so abstracted away it should not impact us.

  3. 3.

    Anonymous, “The Force.com Multitenant Architecture,” https://developer.salesforce.com/page/Multi_Tenant_Architecture , March 31, 2016.

  4. 4.

    There is still a bit of legacy stuff that is not available via the API from before Salesforce made this decision.

  5. 5.

    TCP/IP = Transmission Control Protocol (TCP) and the Internet Protocol (IP).

  6. 6.

    Even if we are writing Apex code, all data access is routed through the Salesforce API. See Anonymous, “Apex Developer Guide,” version 44.0, https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dev_guide.htm , n.d.

  7. 7.

    The full SOQL documentation can be found here: https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql.htm .

  8. 8.

    The Metadata documentation can be found here: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_intro.htm .

  9. 9.

    There are some objects that Salesforce gives us for free—meaning, they don’t charge any storage for them. You can find the list of objects that do count as storage here: https://help.salesforce.com/articleView?id=admin_monitorresources.htm&type=5 .

  10. 10.

    SQL views a basically stored SQL that can then be queried by name, using SQL as if there were a table.

  11. 11.

    Remember, CRUD stands for Create, Read, Update, Delete.

  12. 12.

    When is SystemModStamp different from LastModifiedDate?:

    https://help.salesforce.com/articleView?id=When-is-SystemModStamp-different-from-LastModifiedDate&language=en_US&type=1

  13. 13.

    For a good explanation of optimistic vs. pessimistic locking, see Anonymous, “Optimistic vs. Pessimistic locking,” https://stackoverflow.com/questions/129329/optimistic-vs-pessimistic-locking .

  14. 14.

    I suspect it’s because Salesforce uses inverted indexes. If they do, this would certainly require locking of the parent when a child record is updated. I know for a fact that Salesforce uses inverted indexes in Einstein analytics.

  15. 15.

    Salesforce, “Record Locking Cheat Sheet,” http://resources.docs.salesforce.com/194/0/en-us/sfdc/pdf/record_locking_cheatsheet.pdf .

  16. 16.

    Note that the API name is like a database field name; it can be referenced in code. Because Salesforce fields are also used for UI rendering, they also have a label attribute. The label is what is displayed next to the field when it’s being shown in the UI. We don’t have to worry about changing label values because they are generally not referenced in code, so changing them won’t break anything. This is not the case for API names.

  17. 17.

    A user can’t change the parent but an Admin can change the setting after the field is created, even if there is already data in it, then change the parent.

  18. 18.

    A Salesforce instance if referred to as an organization or org for short.

  19. 19.

    Standard Field Record Id Prefix Decoder: https://help.salesforce.com/articleView?id=Standard-Field-Record-ID-Prefix-Decoder&language=en_US&type=1

  20. 20.

    We can change the data type to Text, update the values then change the data type back to an AutoNumber (and set the starting value to what it was before we changed it to text).

  21. 21.

    You can start here: https://help.salesforce.com/articleView?id=admin_currency.htm&type=5 .

  22. 22.

    The official abbreviation for Coordinated Universal Time is UTC. This abbreviation arose from a desire by the International Telecommunication Union and the International Astronomical Union to use the same abbreviation in all languages. English speakers originally proposed CUT (for “coordinated universal time”), while French speakers proposed TUC (for “temps universel coordonné”). The compromise that emerged was UTC.

  23. 23.

    For a complete list, see: https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_dateformats.htm .

  24. 24.

    Native objects are objects that are standard to Salesforce; they are sometimes called standard objects. Custom objects are object created by Salesforce users or developers. For a complete list of salesforce native objects, see https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_list.htm .

  25. 25.

    https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_list.htm .

  26. 26.

    This can affect calculations that use the field, causing lots of confusion.

  27. 27.

    Infuriating.

  28. 28.

    See https://www.salesforce.com/products/platform/products/shield/ .

  29. 29.

    See https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/compound_fields_address.htm .

  30. 30.

    The example is shown in T-SQL, which is MS SQL Server’s dialect of SQL. Note that all SQL examples in this book use T-SQL

  31. 31.

    Coalesce is a T-SQL command that returns the first non-null values in a parameter list.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2019 David Masri

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Masri, D. (2019). Understanding Salesforce’s Data Architecture. In: Developing Data Migrations and Integrations with Salesforce. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-4209-4_2

Download citation

Publish with us

Policies and ethics