Sequences

An OLTP application, such as an airline reservation system, typically supports a large number of concurrent users. As each user's transaction inserts one or more new rows into various database tables, coordinating the generation of unique primary keys among multiple, concurrent transactions can be a significant challenge for the application.

Fortunately, Oracle has a feature that makes the generation of unique values a trivial matter. A sequence is a schema object that generates a series of unique integers, and is appropriate only for tables that use simple, numerical columns as keys, such as the ID columns used in all tables of our practice schema. When an application inserts a new row into a table, the application simply requests ...

Get Hands-On Oracle Database 10g Express Edition for Windows now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.