lundi 25 mai 2015

Generate oracle database data automatically via FKs whole hierarchy


Is there a tool (for Oracle) that will generate data to all referenced tables starting from the table you want.
Example:

Table

ORDER has 3 not null FKs (CLIENT, PRODUCT, COUNTRY)
CLIENT has 2 not null FKs (COUNTRY, COMPANY)
  COMPANY has 2 not null FKs (COUNTRY, CONTINENT)
COUNTRY has 1 not null FK (CONTINENT)
PRODUCT has 5 not null FKs (MATERIAL, SIZE, ...
 MATERIAL has 2 not null FKs (...

And the hierarchy keeps going.
I just want to add an ORDER in my Database, to test something (with DBUnit), but I don't want to add values in 100 tables.
The generated data could be dummy: 0 for numbers, X for char/varchars, sysdate for date, systimestamp for timestamp. Only the FKs would need to be consistent.

Aucun commentaire:

Enregistrer un commentaire