Primary key generators
Generators that are applied to primary key columns are different from other generators in the following ways:
- The generated data must be unique in order to not break constraints
- The generators are consistent (same input → same output), so that when this generator is applied to a primary key column and its linked foreign key columns, no links are broken.
For more information on this, and details on how to provide your own encryption key, contact [email protected].
You apply a primary key generator in the same way as you do any other generator.
Tonic then automatically applies the same generator to all foreign key columns that reference the primary key.
Foreign keys are either defined by the source schema or added from the Foreign Key Relationships page. See Viewing and adding foreign keys.
Tonic currently supports the following generators for primary key columns:
- ASCII Key The ASCII Key generator does not preserve the format of the input value. It uses the ASCII alphabet for input and the alphanumeric alphabet for output. This leads to output values that are longer than the input values.
Primary key generators are not supported in the Scale table mode. The process requires control over the key columns to make sure that all of the relationships are maintained.
You also cannot assign a primary key generator on a table that is related to a Scale mode table through a foreign key.