A sequence is a user-defined schema bound object that generates a sequence of numeric values according to the specification with which the sequence was created. The sequence of numeric values is generated in an ascending or descending order at a defined interval and can be configured to restart (cycle) when exhausted. Sequences, unlike identity columns, are not associated with specific tables. Applications refer to a sequence object to retrieve its next value. The relationship between sequences and tables is controlled by the application. User applications can reference a sequence object and coordinate the values across multiple rows and tables.
Sequences are quite useful in various scenario's, for example to assign (unique) batch-numbers the products that have been produced and are being stored in a stock table.
I think it would be useful if we could make use of these sequences and be able to define them within the Software Factory. I think the best place to define them would be at the datamodel-level.
It should have options like:
- Name
- Datatype
- Start with value
- Increment value
- Min value (optional)
- Max value (optional)
- Cycle (no/yes)