Generating rows with a composite PK

The simplest way to populate your database with test data.

Moderators: David Atkinson, Anu Deshpande, Lionel

Generating rows with a composite PK

Postby whenriksen » Fri Jun 10, 2011 5:23 pm

How do I use Data Generator to create rows which use a PK consisting of two foreign keys?

It doesn't seem that DG can consider both columns when testing the uniqueness requirement, but instead requires that at least one of the columns be unique or it will end prematurely due to duplicates.

A good example is the northwind database order details table. I can only get DG to insert 1000 order details to go with 1000 new orders, but that limits generated orders to one product each, which is not realistic.

Have I missed something?
whenriksen
 
Posts: 16
Joined: Thu Feb 18, 2010 5:07 pm

Postby Linda Hawksworth » Tue Jun 14, 2011 9:13 am

This is a known issue for which your workaround is the recommended solution (drop the constraint, generate the data and re-enable the constraint). It is logged in our tracking system with reference SDG-849. I will be informed if/when the status changes.
Linda Hawksworth
 
Posts: 192
Joined: Mon Jun 25, 2007 11:32 am

Postby gvsoft » Mon Oct 01, 2012 10:58 pm

What is the status of this bug? I have DG 2.0.3.1 and it still has the same problem.
gvsoft
 
Posts: 16
Joined: Thu Jul 19, 2012 12:11 am


Return to SQL Data Generator 1

Who is online

Users browsing this forum: No registered users and 0 guests