What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
To preserve relational constraints in synthetic data, configure the generator from an explicit schema: identify primary and foreign keys, data types, nullability, uniqueness, relationship cardinality, and generation dependencies. Generate parent rows before child rows, then add only the row-level rules that are true of the data you are modeling. Finally, check the output independently for orphaned keys, duplicates, invalid values, and broken joins. A valid foreign key alone does not guarantee that related rows still make business sense.
What does it mean to preserve relational constraints?
It means generated tables retain the rules that let them work as a database rather than as unrelated collections of plausible-looking rows. At a minimum, every non-null foreign key should point to an existing parent key, primary keys should remain unique, and required columns should not unexpectedly become null. Depending on the application, the output may also need to preserve one-to-one or one-to-many relationships, bridge-table grain, and meaningful correlations between parent and child records.
These are related but distinct goals:
- Referential integrity: a child key resolves to a parent row.
- Structural fidelity: keys, uniqueness, nullability, composite-key grain, and relationship counts follow the intended schema.
- Semantic fidelity: related records make sense together—for example, a child row’s values remain plausible given its parent’s attributes.
- Repeatability: the same entity can be recognized consistently across tables or dataset releases when that is required.
A generator can meet the first goal and fail the others. For example, every order might reference an existing customer, while the generated customer segment and order attributes no longer have the correlations seen in the source. Configuration must state which of these properties the dataset needs to preserve.
What should I inventory before configuring a generator?
Start with a relational graph, not a list of tables. For each table, record its key structure and its relationships; then identify which rows depend on which other rows. This inventory is the contract the generator configuration will express.
Popular on Amazon
- 【90 Degree Full Function USB C Adapter】Supports the latest USB4 standard for up to 40Gbps of bandwidth, 8K video support, and up to 240W Fast charging; Support USB PD 3.1 Extended Power Range (EPR) including 140W, 180W and 240W. Your productivity is easily doubled. *Warm Tip: For the best fit, please make sure the USB-C port is fully exposed; thick or bulky cases may affect compatibility.
- 【Reliable Quality】Made from high-quality, scratch-resistant aluminum alloy, delicate metal frame. get excellent wear resistance and heat dissipation. Non-Slip Design for easier insertion and removal.
- 【Small and portable】Ultra thin size, ultra compact design, a petite physique that matches the minimalist design of your modern laptops. Coming with a slim figure that won't block the port next to the one it's plugged into.
- 【Compatibility】Widely work with most usb c, thunderbolt 4/3 devices. Compatibilit for ROG Ally, Steam Deck, Switch, MacBook Pro, Quest 3 VR headset, Surface Book 2, iPhone 18/17/16/15, Samsung Galaxy S23/S22/S21, Note 20/10, Google Pixel, ChromeBook, etc.
- 【Excellence Customer Support】If you experience any issues or cable failure, simply reach out to our dedicated customer service team. We provide a prompt response within 18 hours, providing you with the necessary technical support to resolve any concerns.
- List every table and its grain. Define what one row represents. A bridge table, for example, may represent one association between two entities; its grain may require a unique pair of foreign keys even if it has its own surrogate primary key.
- Record primary keys and candidate unique keys. Note whether a key is a single column or composite, and whether uniqueness applies to one column or a combination.
- Map each foreign key. Record the child column or columns, referenced table and key, data types on both sides, and whether null is permitted.
- Capture column rules. Record data types, nullability, scalar bounds, allowed categories, and check-like rules that matter to the intended use.
- Estimate relationship counts. For each parent, determine the observed child-count pattern and whether zero children are possible. Record the range or distribution that the synthetic data should approximate.
- Draw generation dependencies. An edge from a parent to a child means the parent keys must be available when child foreign keys are assigned. Mark self-references and cycles explicitly rather than assuming the generator can resolve them.
Exact metadata matters. A child key labeled as an integer when the parent key is a string, or a foreign key pointed at the wrong parent column, can yield output that looks populated but cannot join correctly. YData’s documentation describes requiring a parent primary key and matching parent and child key types for its multi-table workflow. Treat such requirements as product-specific and check the release you use.
How should I separate relationships from row-level rules?
Configure structural rules first: they determine which records can relate and what the table grain is. Then define row-level rules, which constrain values within a record. Keeping the two categories separate makes errors easier to diagnose and prevents a value rule from obscuring a broken relationship model.
| Rule type | Examples | What it protects |
|---|---|---|
| Structural | Primary keys, foreign keys, composite keys, bridge-table grain, cardinality | Whether rows are addressable and joins have the intended shape |
| Row-level | Allowed ranges, inequalities, fixed combinations, unique combinations, one-hot logic | Whether values within a row satisfy modeled rules |
| Cross-table semantic | Child attributes related to parent context; plausible entity-specific values | Whether a valid join also conveys a plausible relationship |
SDV’s documented constraint types illustrate row-level rules such as ranges, inequalities, and fixed or unique combinations. That does not replace metadata for keys and relationships. In the configuration, make the table links explicit first; then encode only the value constraints that the intended synthetic dataset actually needs.
How do I configure parent-child relationships?
Make the parent key explicit, make the child’s foreign key point to it, and specify how many children a parent may have. Generate or otherwise establish the parent-key pool before assigning child foreign keys. The exact syntax differs between tools; the following YAML is a conceptual pattern, not a promise of directly executable syntax in every product.
tables:
customers:
primary_key: customer_id
columns:
customer_id: {datatype: string}
segment: {datatype: categorical}
orders:
primary_key: order_id
foreign_keys:
- column: customer_id
referenced_table: customers
cardinality:
distribution: poisson
lam: 2.5
min: 1
max: 12
context_columns: [segment]
columns:
order_id: {datatype: integer}
customer_id: {datatype: string}
This example expresses a parent key, a child key, a bounded child-count distribution, and parent context. It does not mean every customer must have exactly the same number of orders. If your real schema allows customers with no orders, the minimum in your actual configuration must reflect that; do not copy a sample bound that contradicts your source or use case. YData documents similar concepts, including dependency-order sampling, cardinality controls, parent filters, weights, uniqueness, and parent context. Availability and semantics should be verified for the specific generator version.
For a one-to-one relationship, configure uniqueness on the child-side reference where appropriate and validate that no parent is matched more than once. For a many-to-many relationship, model the bridge table explicitly. Its two foreign keys must resolve to their respective parent tables, and its grain may require a unique pair so the same association is not duplicated. Do not assume that merely defining two valid foreign keys enforces this pair-level rule.
Which key strategy should I use?
Choose based on whether identifiers must be private, correlated across tables, repeatable across runs, or some combination of those needs. A key-generation setting can preserve joins while changing other properties, so “new keys” is not a complete specification.
Free tools Windows power users keep installed
One-click scans. No signup required.
Also popular on Amazon
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
- Generate new identifiers when the output should not expose source identifiers. Verify that the generator assigns the same synthetic identifier to all references to a given entity within the dataset. Syntho documents a Generate mode that preserves referential integrity but not key-column correlations; that distinction is important if key correlations matter to the model or downstream analysis.
- Use a consistency-preserving mapping when the same entity must retain a corresponding key in several tables. Syntho documents Duplicate, Generate, and Hash modes, with Hash preserving correlations and referential integrity. The privacy properties of any mapping depend on its configuration and threat model; do not treat a stable hash as automatically anonymous.
- Use deterministic artificial join keys when repeatability across tables or runs is necessary and the platform supports it. Snowflake documents consistent artificial join keys across tables and runs when a shared consistency secret is supplied. Restrict access to that secret and assess the consequences of reusing it.
Before selecting a mode, answer three questions: Must a repeated source entity map to one synthetic entity? Must the mapping be stable between releases? Must the generated key preserve correlations present in the source key? If the answer to any is yes, test that property with representative records and multiple tables. If the answer is no, avoid preserving unnecessary source-key behavior simply for convenience.
Why can valid foreign keys still produce bad data?
Referential integrity proves that a key resolves; it does not prove that the chosen parent is a sensible one. If child rows are generated independently and their foreign keys are matched automatically, the resulting join can be structurally valid while losing relationships between child attributes and parent characteristics.
For instance, a customer’s segment may be associated with particular order patterns in the source. If the generator samples an order independently and then assigns any valid customer key, the foreign key can pass validation while that segment-order association disappears. The same issue can affect medical records linked to patients, events linked to accounts, or line items linked to orders.
When context matters, configure the generator to condition child sampling on relevant parent attributes if supported, or use a model that represents cross-table dependencies. Syntho’s documentation warns that automatic key matching can maintain referential integrity while losing cross-table correlations; its documented alternatives include consolidating an entity table, a sequence model for up to two tables, or de-identification. Those are product-specific options, not universal guarantees. Compare the selected tool’s exact capabilities with the correlations your application depends on.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsValidation should therefore include more than orphan counts. Compare important parent-child count distributions and multi-column relationships with the source or with approved target ranges. Run representative joins and inspect whether their results make sense for the intended use. Avoid requiring source-level similarity for sensitive patterns that the synthetic dataset is not meant to retain.
When should I add hard business constraints?
Add a hard constraint only when it must hold for every generated row and is true for every real row used to fit the generator. SDV’s documentation states that a constraint should describe a rule true for every row in the real data. If the source has exceptions, first decide whether they are bad records to clean, legitimate cases the model must retain, or cases outside the intended synthetic scenario.
Rules might include an inequality between two columns, a range, a fixed combination of categories, a unique combination, or one-hot encoding in which only one category indicator is active. Some generators enforce constraints through transformations; others use reject sampling. SDV documents both approaches and cautions that overlapping or high-cardinality constraints can slow sampling. A stricter configuration is not automatically a better one if it rejects many candidate rows or removes legitimate diversity.
Also popular on Amazon
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
If you need a particular scenario that is not universal in the source—such as generating only records in a selected range—prefer a documented conditional or filtered sampling mechanism over falsely declaring that the condition always holds. Keep the scenario condition separate from the general validity contract so users can tell whether a dataset represents the full modeled population or a deliberately restricted slice.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Hard constraints also have privacy implications. A constraint can disclose a sensitive business rule or narrow the output’s diversity. Apply only rules necessary for the dataset’s purpose, and review the combined effect of constraints rather than assessing each one in isolation.
What if the schema has composite keys, cycles, or self-references?
Do not assume every generator supports every graph shape. Composite primary keys may be supported even when foreign keys that reference them are not. YData documents composite primary keys but says it does not support foreign keys referencing them, recommending a single surrogate key for referenced tables. Delphix documents unsupported self-referencing and circular foreign-key relationships in its stated release. These are examples of release-specific limits; confirm the behavior of the exact product and version before committing to a design.
For a composite key that another table must reference, a surrogate key can simplify relationship resolution while preserving the original composite uniqueness rule as a separate constraint. For self-references or cycles, possible approaches include staged insertion with deferred constraints or a post-generation repair step—but only when both the generator and target database support the required workflow. A repair step must be deterministic enough to audit and must not silently change the intended row counts or entity relationships.
Test the hardest graph shape early. A successful sample from a simple parent-child pair says little about whether the generator can handle a cycle or composite foreign key. Make unsupported cases explicit in the implementation plan, and decide whether to alter the schema, split generation into stages, or select a tool that supports the required graph.
How do I validate a generated dataset?
Run independent checks after sampling, even when the generator claims to preserve relationships. A successful sampling call is not proof that every structural, value, and semantic rule holds. Use database constraints where possible and add quality checks for properties the database does not enforce.
- Check key completeness and uniqueness. Count null primary keys and duplicate primary-key values. Check unique columns and composite unique combinations separately.
- Check foreign-key resolution. For every child table, count non-null foreign keys with no matching parent. Test each key column or composite key as actually defined.
- Check required values and row rules. Validate nullability, ranges, inequalities, allowed categories, and fixed combinations.
- Check table grain. Look for duplicated bridge-table associations or other repeated combinations that should represent one row.
- Compare relationship counts. Compare the distribution of children per parent, including zero-child parents if allowed, with the source or the explicitly selected target.
- Check semantic joins. Run representative joins used by applications or analysts. Compare key multi-column relationships and parent-context patterns, not only row totals.
- Test consuming workflows. Load the data into the target database and exercise representative queries and application paths. This can expose assumptions not captured by the generator metadata.
A generic orphan check for a single-column relationship can look like this; adapt table and column names to the target database:
Also popular on Amazon
- Portable and powerful USB-C HUB: BENFEI USB Type-C HUB, with super-soft and knot-free silicone woven design cable, meets most mobile office needs. Compact, lightweight, stylish, and powerful portable USB C Hub equipped with 1 x HDMI port, 1 x 100W charging, and 3 x USB ports. 18-month warranty, 24-hour response, to ensure you feel at ease when using our product.
- Design centered on comfort and reliability: Thanks to BENFEI's end-to-end in-house cable production capability, in-house PCBA and assembly capability, using the industry's most advanced silicone woven design and process, 20cm cable in length, no knots, super-soft, the HUB is easy to use in all scenarios: laptop, tablet, stand etc. Super-soft, 25000+ life cycles, to meet your daily carrying and office needs.
- 100W Charging: Support up to 90W USB C pass-through charging via Type-C port to keep your laptop powered. 10W is reserved for other interface operations. No data and video function on the Type-C port.
- 4K HDMI Display: The HDMI port supports media display at resolutions up to 4K 30Hz, keeping every incredible moment detailed and ultra vivid. Please note that the C port of the Host device needs to support video output.
- Transfer Files in Seconds: Transfer files and from your laptop at speeds up to 10 Gbps with USB A 3.2 port. Extra 2 USB A 2.0 ports are perfectly for your keyboards and mouse.
SELECT COUNT(*) AS orphan_count
FROM orders AS o
LEFT JOIN customers AS c
ON o.customer_id = c.customer_id
WHERE o.customer_id IS NOT NULL
AND c.customer_id IS NULL;
For a composite relationship, join on every key component. For duplicate primary keys, group by the key and inspect groups with a count greater than one. Use the target database’s actual constraint and null semantics; this query is an illustration, not a substitute for validating the configured schema.
Do not rely on a generator’s feature list as a validation result. Delphix explicitly states that its documented release does not enforce column-level or table-level CHECK and UNIQUE constraints. Even if a tool enforces foreign keys automatically, independently verify the rules it does not claim to enforce.
Recommended Free Tools
How can I make generation repeatable without exposing source IDs?
Separate repeatability of the synthetic dataset from reuse of source identifiers. Store the generator version, schema metadata, configuration, random seed or consistency secret where applicable, and validation results alongside each dataset release. This record makes it possible to explain how a release was produced and determine whether a change came from configuration, input data, or the generator.
A fixed random seed can support reproducibility in systems that document that behavior, but it is not the same as a stable entity mapping across runs. Conversely, a consistency secret may stabilize generated join keys but has access-control implications. Check the chosen system’s documented guarantees rather than assuming one setting provides both forms of repeatability.
Keep secrets out of broadly accessible data manifests. Limit who can restore or reuse a key-mapping secret, and document what happens if it must be rotated. Where a stable mapping is unnecessary, prefer fresh identifiers and validate the joins within each release.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.What should I compare when choosing a generator?
Evaluate the specific release against the shape of your schema and the data’s intended use; there is no single capability label that answers every relational question. A feature matrix should cover:
- Structural integrity: Are primary keys, foreign keys, composite keys, and bridge-table grain represented and enforced?
- Relationship fidelity: Can it model cardinality, parent context, weights, filters, and cross-table correlations?
- Rule enforcement: Are uniqueness, inequalities, ranges, formulas, and checks hard constraints or best-effort patterns?
- Graph limits: What happens with self-references, cycles, and composite foreign-key references?
- Repeatability: Can keys be reproduced across tables or runs without exposing source identifiers?
- Validation: Does the tool check referential integrity, and can quality and privacy checks be performed independently?
YData, Syntho, Snowflake, and Delphix document materially different capabilities and limitations across these areas. Their documentation is useful for identifying questions to ask, but capabilities should be checked against the exact release and configuration used in production. No comparable performance or privacy benchmark is established here, so do not infer a ranking from feature descriptions.
Also popular on Amazon
- 【Read before You Buy】 Note: This adapter is USB 2.0 version and cannot transmit HDM, VGA, or other video signals. Nevertheless, they are fully capable of charging devices,duplicating files, and can be seamlessly integrated with USB-C earphones, wireless network adapters, and SD card adapters.
- 【Easy to Use and Safe】Thanks to modern manufacturing techniques, we've made these adapters sufficiently compact so that they can remain inserted in your device without noticeable protrusion or inconvenience. This means you don't have to constantly plug and unplug them, reducing the likelihood of wear and misalignment, and making them more convenient to carry around.
- 【Reliable Quality】Engineered for enhanced durability, durable aluminum alloy shell material,get excellent wear resistance and heat dissipation,the male USB C and female USB connectors & the male USB and female USB C connectors are designed to be plugged and unplugged up to 20000 times. Provides data transfer, device charging, memory space expansion, and additional computer peripherals.
- 【Think more for you】Do you need to connect a USB-C-enabled device to an odd device that only has USB-A ports? Then these USB-A male to USB-C female adapters are made for you.Simply insert the adapter into the USB-A port on the device, and you can instantly connect your USB-C device to the device that originally didn't have the correct connection port.
- 【Trusted xiwxi Quality and Service】As a responsible brand seller, you will receive xiwxi's 12-month Quality assurance and lifetime friendly customer service, you're not just buying a product,you're investing in peace of mind with all-round quality and exceptional customer service.
What is a practical configuration sequence?
Use this sequence to turn the schema inventory into an executable contract without confusing structural integrity with semantic fidelity.
- Document the target. State whether the output is a full synthetic database, a scenario-specific sample, or a dataset for a particular workflow. Specify which relationships and correlations must remain meaningful.
- Encode tables and types. Use exact table and column names and the correct data types. Mark primary keys, foreign keys, nullability, and unique combinations explicitly.
- Resolve the graph. Establish dependency order, identify cycles and self-references, and make a plan for unsupported composite references before sampling.
- Select key behavior. Decide whether identifiers are newly generated, mapped consistently within a dataset, or stable across runs. Record the privacy and repeatability trade-off.
- Set relationship counts and context. Configure child-count distributions or bounds and parent context when supported. Ensure the values match the intended population and source rules.
- Add row constraints. Include only hard rules that hold in all fitting rows. Use conditional sampling for intentionally restricted scenarios where appropriate.
- Generate in dependency order. Establish parent keys first, then generate dependent tables so child foreign keys can resolve.
- Validate independently. Check keys, nullability, uniqueness, cardinality, semantic joins, and representative workflows.
- Record the release. Save the configuration, tool version, seed or secret handling details, and validation outcome with the generated dataset.
This order makes failures easier to locate: a bad join points first to metadata, key mapping, or dependency order; plausible joins with implausible records point to cross-table correlation or context; and slow or sparse output may indicate overconstrained sampling. Change one layer at a time and rerun the relevant checks.
What are the most common configuration mistakes?
- Defining only foreign keys. Keys alone do not state cardinality, bridge-table grain, or parent-child correlations.
- Generating tables independently. A later matching step may create valid references but lose semantic relationships.
- Using mismatched key types. Parent and child keys must be compatible for the generator and database to resolve them reliably.
- Copying a sample cardinality blindly. A minimum of one child is wrong if the real model allows zero; a broad range may distort the intended population.
- Hard-coding a rule with source exceptions. A constraint that is false for even some fitting rows may reject data, distort output, or fail to sample efficiently.
- Assuming declared means enforced. Verify each constraint in output, especially CHECK, UNIQUE, composite references, and cycles.
- Confusing privacy with key replacement. New IDs do not by themselves prove privacy, while stable mappings create their own disclosure and access-control considerations.
The safest configuration is not the one with the most constraints. It is the smallest precise set of structural and business rules that supports the dataset’s intended use, followed by checks that prove the generated output satisfies those rules.
Frequently Asked Questions
Should synthetic IDs stay the same between dataset releases?
Only if a downstream workflow needs to recognize the same synthetic entity across releases. Stable mappings can simplify longitudinal comparisons, but they also create a persistent link that needs access controls and an explicit rotation policy.
Can a generator preserve relationships without copying source primary keys?
Yes. A generator can assign artificial identifiers and use those consistently in related tables. Confirm whether its key mode preserves entity identity across all tables and whether that identity is limited to one dataset or remains stable across runs.
Does a successful database load prove the synthetic data is valid?
No. Some databases enforce only the constraints actually declared, and some generator releases do not enforce every CHECK or UNIQUE rule. Validate the data against the intended schema and business rules after loading.
What should I save with a synthetic dataset release?
Keep the schema and generator configuration, the exact generator version, applicable seed or consistency-secret handling information, and the validation results. Also note the dataset’s intended scenario so later users do not mistake a conditional sample for a full representation.

