Is there a way to generate random data and yet honor the PK, FK constraints
WinWin
Posts: 1 New member
Hi there,
I have just downloaded a trial version of Red Gate SQL Data generator and wanted to know , if we can generate random data in SQL Data Generator rows (say 1,000,000 rows per table in a DB) meeting all the constraints that are imposed on the SQL server 2014 database. The constraints should not be altered, disabled or deleted and the data generated should meet these constraints.
Thanks,
Vinay
I have just downloaded a trial version of Red Gate SQL Data generator and wanted to know , if we can generate random data in SQL Data Generator rows (say 1,000,000 rows per table in a DB) meeting all the constraints that are imposed on the SQL server 2014 database. The constraints should not be altered, disabled or deleted and the data generated should meet these constraints.
Thanks,
Vinay
Tagged:
Best Answer
-
Alex B Posts: 1,158 Diamond 4Hi @WinWin,
SQL Data Generator automatically assigns the Foreign Key generator to columns that have a foreign key constraint. See the section Foreign Keys from this documentation page which describes this (there is also information. You can customize the generator, but it must be used for any column that has a foreign key.
Kind regards,
Alex