Skip to content
iPCRiME.COMThe Underground Has a Newsroom
Latest News
ALL NEWS
Tool Comparison

What belongs in a test database? Schema-only, synthetic and masked data compared

A database migration, a checkout bug and a reporting test need different inputs. Choose the smallest dataset that can answer your question.

Digital Arsenal ComparisonsPublished Nov 28, 2026 at 6:44 PM ESTReviewed 2026-11-28Documentation-based comparison

A developer fixing a refund bug may need two orders, a split payment and a return. None of those records has to belong to a customer. Start by writing down the behavior that must fail before the fix and pass afterward. That tells you how much data the test needs.

ApproachGood fitWhat to check
Schema-only exportCheck whether a fresh database builds with the expected tables and constraints.Real rows are absent. Review definitions and comments before sharing the export.
Invented test recordsExercise late returns, partial refunds, missing addresses or duplicate orders.Create the relationships the application expects. Use invented names, addresses and attachments.
Masked production copyInvestigate behavior that depends on a real distribution or hard-to-reproduce relationships.Dates, rare combinations, free text and stable identifiers can still identify people. Treat the copy as sensitive while assessing it.

A checkout example

Give a fictional shopper two orders for the same item at different prices. Refund one line and check which balance changes. A third invented order can test a missing receipt. Keep those records with the test so another engineer can reproduce the failure after the database is rebuilt.

For a PostgreSQL migration, pg_dump --schema-only exports object definitions. That lets a team test whether an empty structure builds. To find out whether a migration handles an existing row with a missing value, add a small fixture for that case. PostgreSQL’s pg_dump reference.

When someone requests a production snapshot

Ask which property the smaller dataset failed to reproduce. Limit the fields, time range and people who can open the copy. Inventory attached images, exports, backups and free-text fields. Assign an owner and expiry date, and record where the copies went so the team can remove them when the test ends.

A masked record can still be linked to a person through other information. Synthetic data generated from real records also needs a disclosure-risk assessment. A handful of examples an engineer invents from scratch has a different origin. NIST’s de-identification guidance and the UK Information Commissioner’s guidance on anonymisation explain those risks.

This comparison is based on documentation. The checkout scenario is an illustrative test case.

Read how ZOZO determined whom to notify after old test data was exposed.

Editorial policySubmit a correction

Saved stories

Your reading list is stored in this browser.