Creating and Editing Generators
Go Up to Creating and Editing Database Dependent Objects
Contents
A generator is a sequential number that can be automatically inserted in a column. Generators are typically used for purposes such as ensuring a unique value in a primary key that uniquely identifies an associated row. The Generator wizard lets you create a generator and sets its starting value to zero.
The following database platforms support generator creation.
- Interbase 2009, Interbase XE, Interbase XE3, Firebird 1.5, Firebird 2.x.
Note: The Bufferpool Wizard and Bufferpool Editor share the same options, except for PreSQL & PostSQL and Attachment Bindings options, which are present only in the editor.
To Create a Generator
- In the Data Model Explorer, expand an InterBase physical model, and then click New Generator.
- Complete the steps on the Generator Wizard and then click Finish to create the buffer pool.
To Edit a Generator
Once you have created the generator, you can edit it by right-clicking the generator you want to change, and then selecting Edit Generator.
The following helps you complete the tabs on the Generator Editor :
Name tab
Provide a name for a new generator or edit the name of an existing generator.
Definition tab
Provide a description for the generator. It will be visible in the model.
DDL tab
Displays the CREATE GENERATOR statement needed to build the generator. ER/Studio Data Architect uses the platform-specific parser of the model's selected database platform to generate the generator DDL.
PreSQL & PostSQL tab
Lets you enter SQL to be applied before or after the CREATE GENERATOR statement. The PreSQL and PostSQL scripts entered here are included in the script when you generate the physical database.
Attachment Bindings tab
Bind an external piece of information, or attachment to the generator. You can also remove an attachment from an object, override an attachment binding's default value, or change the position of a bound attachment. To override the value of the attachment you have moved to the Selected Attachments grid, double-click the Value field of the target attachment. ER/Studio Data Architect opens the Value Override Editor or a list depending on the attachment datatype. Attachments are created in the Attachments folder of the Data Dictionary. For more information, see Attaching External Documents to the Data Model.