Random data issue

The simplest way to populate your database with test data.

Moderators: David Atkinson, Anu Deshpande, Lionel

Random data issue

Postby tkdennis » Tue May 13, 2008 9:06 am

I have 2 child tables with Foreign Keys from the same parent table all using the same unique 3-column key. I'm trying to generate different rows in Child1 and Child2, but have not been able to do so.

Parent Rows 600,000 (already generated)
Child Rows 300,000

I have changed the seed values several times, changed the Population method to Repeat Key Values at Random or All Key Values Unique but I still get almost 100% the same keys in the two Child tables when I would expect 50% overlap if it were truly random.

I also tried different row counts and seeds:
Child row counts 100: 6 are duplicates
Child row counts 100, changed seeds: 7 are duplicates
Child row counts 1,000: 561 are duplicates
Child row counts 1,000, changed seeds: 545 are duplicates
Child row counts 10,000: 9496 are duplicates
Child row counts 10,000, changed seeds: 10,000 are duplicates

Am I doing something wrong??

Thanks,
Traci
tkdennis
 
Posts: 75
Joined: Fri Feb 29, 2008 1:13 am

More information

Postby tkdennis » Tue May 13, 2008 11:16 pm

The first 2 columns of the 3-part key are being selected by the Foreign Key generator in numerical order regardless of the Seed or Population method. For example:

Table A (parent table, 600000 rows
Key 1 - randomly numbered 1-999999)
Key 2 - randomly numbered 1-10)
Key 3 - randomly numbered 1-5)

Table B (child table, Foreign Key to Table A on Key1, Key2, Key3)
Trying to generate 100 rows of data for Table B randomly from Table A
Key 1 - Sequentially numbering from Table A.Key1
Key 2 - Sequentially numbering from Table A.Key2
Key 3 - Randomly selecting values from Table A.Key3

The Foreign Key generator is not randomly selecting rows from the 3-part composite key in Table A. It is running through Table A sequentially and deciding at random whether to take the row or not until it reaches the number of rows requested, which in this case is significantly less than the total rows available so only the first part of the Table A is ever processed.

The app won't let me change the Foreign Key Generator on those columns. Is it possible to configure it in some way to get a truly random selection of rows from Table A?

Thanks,
Traci
tkdennis
 
Posts: 75
Joined: Fri Feb 29, 2008 1:13 am

Postby tkdennis » Tue May 20, 2008 10:31 pm

bump
tkdennis
 
Posts: 75
Joined: Fri Feb 29, 2008 1:13 am

Postby benhall » Fri May 23, 2008 1:30 pm

Hello,

I'm really sorry for the delay in replying. Been trying to get head around your db structure.

Could you please email me with your DB structure so we can discuss this offline.

Thanks

Ben
benhall
 
Posts: 69
Joined: Fri Dec 14, 2007 11:15 am


Return to SQL Data Generator 1

Who is online

Users browsing this forum: No registered users and 1 guest