Contents Index How default values are chosen The primary key pool table

SQL Remote User's Guide
  SQL Remote Design for Adaptive Server Anywhere
    Ensuring unique primary keys

Using primary key pools


The primary key pool is a table that holds a set of primary key values for each database in the SQL Remote installation. Each remote user receives their own set of primary key values. When a remote user inserts a new row into a table, they use a stored procedure to select a valid primary key from the pool. The pool is maintained by periodically running a procedure at the consolidated database that replenishes the supply.

The method is described using a simple example database consisting of sales representatives and their customers. The tables are much simpler than you would use in a real database; this allows us to focus just on those issues important for replication.


Contents Index How default values are chosen The primary key pool table