Honouring RI (referential integrity) in generated data #321
-
Hello Team Synth! Your project looks very interesting.......I'm wondering if Synth can help generate data such that it honours the referential integrity relationships between entities? For example, customers can have 0 or many orders and each order has 1 or many order_items. Can these types of relationship be defined and data generated....ideally based on some sort of discovery over the target schema objects (table, primary and foreign keys and indexes defined)? Cheers and thanks advance Jason Smith |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @jsmith085 - FK constraints can also be specified manually by using the Hope this helps! |
Beta Was this translation helpful? Give feedback.
Hey @jsmith085 -
synth import
will automatically infer foreign keys. Constraints such as 'at least one' or 'zero or more' need to be defined explicitly with relative collection sizes (see -> https://www.getsynth.com/docs/getting_started/schema).FK constraints can also be specified manually by using the
same_as
generator, see -> https://www.getsynth.com/docs/content/same-asHope this helps!