...

View Full Version : Looking for test data to populate database



litebearer
05-09-2004, 11:22 PM
Hi...

Guess I am feeling a bit lazy; however, I was curious of anyone knew of some resources where dummy/test data could be acquired.

In developing an application, it is tiresome to have to key in 30-50 records of data in order to more fully test the application. Ideally, am looking for either public databases to dump or csv files - fields would be comprised of - lastname, firstname, street, city, zip, telephone, company names - deadend emails and urls that exist but don't exist (by that I mean have the ability to be checked as valid emails and urls but are not being used - don't want to send test emails to the same few addresses or real urls)

Thanks,

Lite...

sad69
05-10-2004, 10:10 PM
I don't know of one, but couldn't you make one yourself? I'm sure you can write a PHP script that would create random text and insert it into your database..

I think it would be difficult to come up with a generic csv that would match your (or anyone else's) table/schema.

Sadiq.

mordred
05-10-2004, 10:48 PM
I second sad69s suggestion. Write a small PHP script do create test data that exactly fits your needs. Define some arrays with first/last names, city and street names, and let emails point to example.com, this URL is reserved as a testing placeholder. During a loop, construct your SQL statement by using random values out of these test data arrays. Repeat until you're satisfied with the amount of data created.

This has the added value that you'll have to think what kind of data might wander into your database (for example, where do you put the middle initial of names? First name or last name? What with titles?).

BTW, I do have sample SQL code for cities, countries etc. But I don't know if it's useful to you, because it follows german formats and I doubt that the zip code you have in mind matches the one used in Germany. Another argument for "rolling your own". ;)

litebearer
05-11-2004, 01:58 AM
Thanks. I appreciate the input and have begun to do just that.

Using about 2000 name I 'borrowed" off of a Popular baby names site and a few hundred surnames garnered from some geneology (sp) sites. I figure using a small random number script will provide me with more than ample names. Then couple that with some carefully garnered cities/state/zips/area codes, I should be able to create a few thousand unique entries.

I appreciate your responses.

Lite

Darknight
05-11-2004, 02:25 PM
I would use excel or open office to make the csv file. You can put values in one cell and drag them down as needed. Should take about 10 seconds to make 1000+ records.

Leppy
05-30-2009, 12:45 PM
I realized I am very late, but this is exactly what you need

http://github.com/caius/php-faker/tree/master

venegal
05-30-2009, 04:24 PM
You are very late indeed. That thing you linked to didn't even exist five years ago.

Leppy
05-30-2009, 07:07 PM
You are very late indeed. That thing you linked to didn't even exist five years ago.

I found this thread while I was searching on Google for something similar, this post didn't help me so I kept on searching and I found the link above. I posted it here to help future people who are looking for something similar or gets on this thread the same way I did.

It was not solely aim at the thread starter because obviously he must've found his solution by now.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum