I am wondering if anyone has any idea how Salesforce designs their database to allow users to create dynamic fields (User Defined Fields).

A few possibilities that I can think of but not sure if they are even using anyone of these. 1 - Storing User Defined Fields as JSON in a table column. 2 - Storing User Defined Fields as individual table with a master table to tie them up. 3 - Creating a new column in the table for every User Defined Field created.

1 Answer 1


This article describes pretty well how Salesforce maintains their multi-tenancy architecture: https://developer.salesforce.com/page/Multi_Tenant_Architecture

I hope this helps.

  • Thanks for the info. Do you know how they handle master account (main user) and sub account (sub user) login? Do they login at the same portal? I play around the trial version and did not have the chance to check if I can create a sub account under my main account and login as well.
    – Norman
    Apr 28, 2017 at 8:34
  • I guess when you say master/sub account you are talking about user accounts. Salesforce does not have a hierarchy of user accounts. If you create a user you can login as this one and create other users (if you're a system admin). Those users aren't below you in a hierarchy. Apr 28, 2017 at 8:37
  • Yes I am referring to stuff like master and sub accounts. For example, on my main account (registered with salesforce) and sub account (any account that I later on creates). So how does salesforce proceeds with the login? If I am not wrong they are using a master user DB to login users, are the sub accounts (the ones created later on) stored inside this master user DB as well?
    – Norman
    Apr 28, 2017 at 8:42
  • Every user you create is linked to your organisation id (you can find them via the setup under company information). The user you create first has simply the system admin profile which allows to create others users. The users you create can also be system admins (depending on the profile you assign). When you login as any user via login.salesforce.com your credentials are checked against a central user repository and if successful you get logged in to the org your user related to Apr 28, 2017 at 8:46
  • Sorry to off track a bit. May I know if every organization (main account) have their individual database? Also, does every account (main or sub) have their records stored in a primary database which login will authenticate with?
    – Norman
    Apr 28, 2017 at 8:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .