views:

79

answers:

3

I have a discussion-db, and I need a great amount of test data, for different sized samples. Please, see the ready SELECT, JOIN and CREATE-queries, please scroll down in the link.

  1. How can I automatically generate test data to the db?

  2. How to generate test data in different sized samples?

  3. Is there some ready tool?

A: 

I'm not sure how to get automatically generated data and insert it into the database (I'm sure you could pull it off with a python script or something), but if you're just looking for endless blabbering to stick into a db, this should be helpful.

Vestonian
+2  A: 

Here are a couple of suggestions for free tools that generate test data:

  • Databene Benerator: supports many JDBC-capable database brands, uses XML format compatible with DbUnit, GPL license.

  • Super Smack: originally a load-test tool for MySQL, it also supports PostgreSQL and it includes a generator of mock data.

I asked a similar question here on StackOverflow in February, and the two choices above seemed like the best options.

Bill Karwin
Which one is easier to use for Postgres?
Masi
As a software developer, you should have the ability to download two such tools, try them out, and evaluate which one meets your needs best.
Bill Karwin
A: 

I'm not a postres person, but in many other DBs I've used, a simple mechanism for generating large quantities of test data is a cross join. The technique is particularly useful for generating large quantities of test data.

Here's a nice blog post on it (SQL Server specific though).

RichardOD