Manage primary keys
When you set a foreign key to another table, you need to specify the primary key of the referenced table. This is required to create the table relationship. This also automatically sets a primary key if the referenced table did not already have one.
If necessary, you can manually set and remove primary keys for each table in a generator.
Set a primary key
You can set the primary key for any table regardless of the synthetic data use case (single-table, two-table, or multi-table).
Steps
- On the Data configuration page, click the Primary key drop-down for a table.
- Select the primary key column for the table.
- (Optional) Repeat for all tables.
Remove a primary key
To remove a primary key, hover over a table in the Primary key column and click the button.
If a foreign key references the primary key you want to remove, you will get a warning that this will break the existing relationship.