Feature Request: Distributing numeric data randomly

The simplest way to populate your database with test data.

Moderators: David Atkinson, Anu Deshpande, Lionel

Feature Request: Distributing numeric data randomly

Postby DAndres109@aol.com » Sat May 03, 2008 2:20 am

Hi,

This would be a really cool feature, and I believe other users may have similar needs to my own. If this feature already exists, please let me know.

To be able to Randomly generate a single numeric quantity is great, but would it be possible to take that quantity and, when generating records for another table, be able to distribute that value amongst a random number of records.

For example, assume the following schemae exist:

Table A:
AId: primary
Sum: int

Table B:
BId: primary
AId: FK
Amount: int

Where A.Sum equals the sum of B.Amount where B.AId = A.AId

There are two directions that can be taken to satisfy this need: either I can generate B records and then add them up into A (min/max values on the sum of all B records that share AId values would be great), or I can take the A.Sum quantity and distribute it randomly amongst a random number of B records, as in:

A.AId = 1, A.Sum = 10000

B.BId = 1, B.AId = 1, Amount = 200
B.BId = 2, B.AId = 1, Amount = 4000
B.BId = 3, B.AId = 1, Amount = 4800
B.BId = 4, B.AId = 1, Amount = 1000

Any interest in adding these solutions as features?

David Andres
DAndres109@aol.com
 
Posts: 14
Joined: Sat May 03, 2008 1:25 am
Location: New York

Return to SQL Data Generator 1

Who is online

Users browsing this forum: No registered users and 0 guests