I have a MySQL database with InnoDB tables, many of which have foreign keys.
I was going to write a script to populate the tables with test data (10-20k rows or more) but I thought I ought to ask if there's something already out there that can generate test data based on the field types but ensure relational integrity at the same time?
I've seen and have downloaded the script at generatedata.com but as far as I can see it's clever but it won't read the tables within your db and generate data based on what it finds- you have to do it all manually.
It’s a characteristic of relational systems, which store data in tables that may be linked and used in various ways. The term “referential integrity” refers to a set of procedures that ensure that data is saved and used consistently.
This essay on Data Integrity in Relational Databases was written and submitted by your fellow student. You are free to use it for research and reference purposes in order to write your own paper; however, you must cite it accordingly . If you are the copyright owner of this paper and no longer wish to have your work published on IvyPanda.
In this tip we will see how to create large tables of random data that can be used for performance testing. The solution is to this problem is to write a script that can add large amount of random data into the SQL Server database so that queries can be evaluated for performance and execution.
Not to fearit's a good deal less interesting than that, unless you're a database designer, in which case it's endlessly fascinating. Relational integrity, also known as referential integrity, speaks to the notion that a database structure, as expressed in an ERD, also implies certain rules about what can and cannot happen in a database.
This one is as easy as:
call procedurename('DATABASE','TABLE',1000,'');
will fill 1000 random rows and will populate records as per your needs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With