# How do CopyStorm Partitions Work?

When replicating Salesforce data and schema to the CopyStorm database, CopyStorm will create database tables and columns which mirror the object and field structure in Salesforce. For example, there is a Salesforce object called “Account”, with a String field called “Name”. This means that the CopyStorm database will have a table called “Account” with a VARCHAR or CLOB field called “Name”.

CopyStorm partitions use a technique called Vertical Partitioning to change the CopyStorm database schema by separating the database table for an object into multiple tables. Of course – CopyStorm, CopyStorm/Restore, and CopyStorm/Medic are fully compatible with CopyStorm partitions.

For example, by default, the CopyStorm database may have an “Account” table with these columns:

1. Id
2. SystemModstamp
3. Name
4. BillingStreet
5. BillingCity
6. BillingState

If the “Billing” fields are moved to a new partition, the database will have multiple tables:

1. The “Account” table, with these columns:
   1. Id
   2. SystemModstamp
   3. Name
2. An “Account\_\_part1” table, with these columns:
   1. Id
   2. BillingStreet
   3. BillingCity
   4. BillingState

Virtually any field can be moved to a partition if needed – with the exception of a small number of fields that require special handling.

* The “Id” database column is always present on every partition.
* A handful of fields are required to remain on the primary partition:
  * IsDeleted
  * Salesforce Modification Timestamps:
    * SystemModstamp
    * LastModifiedDate
  * Salesforce Audit Timestamps:
    * CreatedDate
    * LoginTime
    * SentDate
* Fields that are encrypted with the CS:Govern application.

Partitions may be created for virtually any object – the only exceptions are:

* BigObjects
* Tables that are included in the [CopyStorm Database View system](/frequently-asked-questions/how-does-copystorm-work/how-do-copystorm-views-work.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.capstorm.com/reference/copystorm-medic/partition-editor/how-do-copystorm-partitions-work.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
