Generate data for Database testing

- Image by lilit via Flickr
How often have you tested your application on your local machine and had it run properly, but when you deploy it and the database starts getting filled up, you start noticing performance problems?
Here’s something you can use to test out your application with databases which are not empty – generatedata.com allows you to define your table structure and the type of data to fill it with. You can export the generated data as SQL (MySQL and Oracle are supported currently) insert statements or csv which you can import into your databases. The online version allows you to export 200 rows of generated data. If you want larger datasets to be generated, you can download the datagenerator script and run it on your own server.
The best part of the script is instead of generating totally random string or numeric data, you some some semi-realistic data which can be used for testing.
Here’s a sample form I created on the site (click on the image to enlarge):
The SQL generated from this form:
CREATE TABLE myTable ( id mediumint(8) unsigned NOT NULL auto_increment, id MEDIUMINT default NULL, name varchar(255) default NULL, city varchar(50) default NULL, country varchar(50) default NULL, dateofjoining varchar(50) default NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=1; INSERT INTO myTable (id,name,city,country,dateofjoining) VALUES ('1','Inez','Muncie','Grenada','2009-04-19 12:55:49'); INSERT INTO myTable (id,name,city,country,dateofjoining) VALUES ('2','Reese','Washington','Suriname','2009-10-17 01:28:15'); INSERT INTO myTable (id,name,city,country,dateofjoining) VALUES ('3','Hope','Edina','Guyana','2008-02-22 10:17:55'); INSERT INTO myTable (id,name,city,country,dateofjoining) VALUES ('4','Cameron','Sister Bay','Malaysia','2008-02-21 01:38:18'); INSERT INTO myTable (id,name,city,country,dateofjoining) VALUES ('5','Zephr','Lebanon','Syrian Arab Republic','2008-12-09 21:40:04'); INSERT INTO myTable (id,name,city,country,dateofjoining) VALUES ('6','Byron','Indio','Afghanistan','2009-03-15 08:50:17'); INSERT INTO myTable (id,name,city,country,dateofjoining) VALUES ('7','Carol','Bay St. Louis','British Indian Ocean Territory','2009-04-16 04:57:43'); INSERT INTO myTable (id,name,city,country,dateofjoining) VALUES ('8','Latifah','Geneva','Albania','2009-08-25 00:14:26'); INSERT INTO myTable (id,name,city,country,dateofjoining) VALUES ('9','Nina','Fall River','Solomon Islands','2009-01-03 21:45:51'); INSERT INTO myTable (id,name,city,country,dateofjoining) VALUES ('10','Jorden','Ardmore','Latvia','2009-01-20 19:31:36'); |
Get more information at: generatedata.com



![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=b72abd17-c8a6-42c6-ba04-30130fbbb69b)


