Data Migration

Salesforce Database Migration: Moving Legacy Data In Without Losing the Business

Migrating a relational database into Salesforce is a modelling problem before it is a loading problem, because the object model and the schema rarely line up.

RASPSYS Admin10 min read

Short answer

Migrating a relational database into Salesforce is a modelling problem before it is a loading problem, because the object model and the schema rarely line up. This guide covers mapping a relational schema to Salesforce objects, handling history and volume, the load sequence, reconciliation, and how to decide what not to migrate.

It Is a Modelling Problem Before It Is a Loading Problem

Teams planning a database migration into Salesforce often start by evaluating loading tools. That is the last decision, not the first. The loading tools are commoditised and all adequate. The work that determines success is deciding what the Salesforce object model should be, given data that was designed for a different system under different constraints.

Relational schemas are normalised, use composite keys, permit many-to-many relationships freely, and enforce integrity through constraints. Salesforce has an object model with specific relationship types, limits on how objects relate, platform-enforced behaviours on standard objects, and governor limits that shape what is practical.

Source pattern Salesforce equivalent Decision required
Many-to-many relationship Junction object with two master-detail relationships Which parent is the master, since that governs ownership and deletion
Composite primary key A single External ID field, usually concatenated How to build a stable key that will not collide
Table with 300 columns An object, possibly split across related objects Which columns are still used; typically many are not
Self-referencing hierarchy Lookup to the same object, or standard hierarchy fields Depth, and whether rollups are needed across the hierarchy
Separate address table Fields on the parent, or a related object Whether multiple addresses per record are genuinely required
Audit or history table Field History, a custom object, or an external archive Whether the history must be queryable in Salesforce or merely retained

Every row in that table is a design decision that affects reporting, automation, and sharing for years. Making them by default — mapping each source table to one custom object — produces an org that mirrors a legacy schema nobody liked in the first place.

Get a source data assessment from RASPSYS →

Profile the Source Before Planning Anything

Every migration plan rests on assumptions about the source data, and those assumptions are usually optimistic. Profiling replaces them with facts, takes a few days, and routinely changes the plan.

01

Count rows per table

Including tables nobody mentioned. Volume drives both the load approach and the licence conversation.

02

Measure completeness per column

Percentage populated. Columns below a threshold are candidates for exclusion rather than migration.

03

Check distinct values on coded fields

A status column with forty-three distinct values where the documentation lists six tells you about data quality and about process.

04

Find the duplicates

Count records matching on the business keys you intend to use. This number determines your deduplication effort.

05

Test referential integrity

Count orphaned child rows. Databases without enforced constraints accumulate these.

06

Date range the activity

How much of the data relates to records last touched more than five years ago? That is your archive candidate.

The finding that changes most plans

The proportion of records that are genuinely active. In a typical legacy database, a large share of rows relate to accounts, contacts, or cases that have had no activity for years. Migrating them costs storage, slows reports, complicates deduplication, and degrades search quality. Decide the cutoff explicitly rather than migrating everything because it is there.

Profiling output should be a document, shared with the business, with the decisions it implies stated plainly. "We propose to exclude 340,000 contacts with no activity since 2018" is a business decision, not a technical one, and it needs an owner who is comfortable defending it.

Deciding What Not to Migrate

The default assumption on most projects is that everything moves. Challenging that assumption is the single most effective way to reduce cost, risk, and timeline on a database migration.

Data category Default treatment Better question
Inactive customer records Migrate everything What is the cutoff, and who would notice if they were archived instead?
Historical transactions Migrate all history How far back does anyone actually query, and could the rest live in a warehouse?
Audit and change logs Migrate to a custom object Does this need to be in Salesforce, or retained somewhere accessible?
Free-text notes Migrate as-is Are they readable and useful, or twenty years of abbreviations?
Attachments and documents Migrate all files Storage cost is real; which document types have ongoing value?
Deprecated fields Create them to be safe If it has not been populated since 2019, leave it behind

An archive strategy makes these conversations easier. If excluded data is preserved in a read-only store that someone can query when required, the decision to exclude it becomes far less contentious. Without that reassurance, every stakeholder defends every field.

Be aware of the storage dimension too. Salesforce data and file storage allocations are finite and additional storage is chargeable. A migration that moves everything can create a recurring cost that nobody included in the business case.

Load Sequence and the Mechanics That Matter

Salesforce enforces relationships at load time, which means order matters. Parents before children, lookups before the records that point at them, and users and record owners before anything they own.

01

Users and owners

Every record needs an owner. Inactive legacy users need a strategy — usually a named migration user or reassignment.

02

Reference and picklist data

Price books, products, record types, and anything else referenced by transactional data.

03

Accounts

Including the account hierarchy, which usually needs two passes: load, then set parent relationships.

04

Contacts and related people

With their account relationships resolved by External ID.

05

Open transactional records

Opportunities, cases, and orders that are still active and will be worked in Salesforce.

06

Closed history

Whatever history you decided to bring, loaded last so a problem here does not block go-live.

Three mechanics make the difference between a smooth load and a difficult one. Use External ID fields everywhere and upsert rather than insert, so a re-run corrects rather than duplicates. Disable automation — triggers, flows, validation rules, workflow — during the load, and re-enable with a documented checklist afterwards. And load into a full sandbox first at production volume, because the dress rehearsal is where you find the problems.

On disabling automation

Keep a written list of everything disabled and who disabled it, and verify it is all re-enabled before go-live. A validation rule left off after a migration is a quiet data quality problem that surfaces months later, by which point thousands of records have bypassed it.

Plan a migration load sequence with RASPSYS →

Reconciliation: Proving It Worked

A migration is not complete when the load finishes. It is complete when someone can demonstrate that what is in Salesforce matches what was in the source, in terms the business recognises.

Technical reconciliation — row counts per object, sum of key numeric fields, count of records per status — is necessary and insufficient. Business reconciliation is what earns trust: take the twenty accounts the sales director knows best and have them checked by hand.

Check How to run it What a mismatch usually means
Row counts per object Source query against Salesforce count, per object and per record type Filter criteria differed between the plan and the extract
Financial totals Sum of amount fields by period, compared to the source Currency handling, or excluded records that should have been included
Relationship integrity Count of child records with no parent Load order problem, or orphans that existed in the source
Owner distribution Record count by owner, compared to source The inactive user mapping did not cover every case
Spot check by people Twenty known records reviewed by the people who know them Field mapping errors that aggregate checks cannot detect
Report comparison Run the three reports the business lives by, in both systems The most convincing evidence available, and the most frequently skipped

The report comparison is the one to insist on. If the monthly pipeline report produces the same number in both systems, people will believe the migration. If it does not, no amount of row-count evidence will persuade them.

Cutover: The Weekend That Has to Work

Most database migrations end with a cutover window during which the source is frozen, the final delta is loaded, and the new system opens. Planning it properly is a distinct exercise from planning the migration.

  • Rehearse at full volume. A rehearsal that takes six hours tells you a great deal about a twelve-hour window. One run against a subset tells you almost nothing.
  • Time every step. Build a runbook with expected durations, and track actuals during the rehearsal so the real cutover has a schedule rather than a hope.
  • Define the go/no-go criteria in advance. And the time at which the decision is made, so nobody is deciding at 4am under pressure.
  • Plan the rollback. Usually "keep the legacy system running read-only and do not switch off integrations for two weeks". Make sure it is actually possible.
  • Freeze the source. And tell everyone, repeatedly. Records created in the legacy system during cutover are the most common source of post-migration discrepancies.
  • Staff the first week. Not just support — the migration team. The questions in week one are migration questions.

Keep the legacy system available read-only for longer than you think necessary. It costs little and it is the difference between answering a question in ten minutes and spending a day reconstructing what the data used to look like.

Get cutover planning support →

Choosing a Partner for a Database Migration

Data migration attracts both specialist firms and generalists who treat it as a subtask of an implementation. The distinction matters, because migration has its own discipline.

Question to ask What a strong answer sounds like
How do you profile source data? A described process producing a written report before the plan is finalised
How do you handle duplicates? Matching rules agreed with the business, with a review step for uncertain matches
How many rehearsals are in the plan? At least two at full volume, with timings recorded
How will we know it worked? A reconciliation pack including business report comparison, not just row counts
What is your rollback plan? A specific, tested plan rather than "we have never needed one"
Who owns decisions about exclusions? Named business owners, because these are business decisions

Be cautious of any proposal that prices migration as a fixed, small percentage of an implementation without having seen the data. The honest position before profiling is a range, and a partner willing to say so is more trustworthy than one who is not.

Frequently Asked Questions

What is the hardest part of migrating a legacy database into Salesforce?

Deciding the target object model. Relational schemas are normalised, use composite keys, and allow many-to-many relationships freely; Salesforce has specific relationship types, platform behaviours on standard objects, and governor limits that shape what is practical. Mapping each source table to one custom object is the default and usually wrong — it reproduces a schema nobody liked in a platform that works differently. Decisions such as which parent owns a junction object, or whether history belongs in Salesforce at all, affect reporting and sharing for years.

Should we migrate all our historical data?

Usually not, and challenging that assumption is the most effective way to reduce cost and risk. In a typical legacy database a large share of records have had no activity for years; migrating them costs storage, slows reports, complicates deduplication, and degrades search. Profile the data to establish what proportion is genuinely active, then set an explicit cutoff. The conversation becomes much easier if excluded data is preserved in a read-only archive someone can query, because stakeholders stop defending every field once they know nothing is being destroyed.

What order should data be loaded in?

Users and record owners first, since every record needs an owner and inactive legacy users need a mapping strategy. Then reference data such as products, price books, and record types. Then accounts, usually in two passes so the hierarchy can be set after the records exist. Then contacts and related people, then open transactional records, and finally whatever closed history you decided to bring — loaded last so a problem there does not block go-live. Use External ID fields and upsert throughout, so a re-run corrects rather than duplicates.

How do we prove the migration was successful?

Technical checks are necessary but not persuasive on their own: row counts per object, sums of key numeric fields, counts of orphaned child records, and owner distribution. What earns business trust is running the three reports the organisation lives by in both the old and new systems and getting the same numbers, plus a manual spot check of twenty records by the people who know them best. Field mapping errors frequently survive aggregate checks and are caught immediately by someone looking at a record they recognise.

How long does a Salesforce database migration take?

A single well-understood source with a few hundred thousand records and a clean model can run six to ten weeks including profiling, mapping, two rehearsals, and cutover. Multiple sources, tens of millions of records, poor source data quality, or an object model that has to be designed from scratch can extend that to six months or more. Profiling is what turns an estimate into a plan — be wary of any fixed price quoted before the source data has been examined, because the honest answer at that stage is a range.

Moving a Legacy Database Into Salesforce?

RASPSYS can profile the source before you commit to a plan, design an object model that fits the data you actually have, and run the migration with reconciliation that proves the result rather than asserting it.