Hi Stacy,

> I was thinking of using a single db table with single db column to store
> the current 'highest value' for the primary key.

> If anyone's used this method before...do you this incremental value
> across multiple tables? i.e. I have a table for 'orders' and another for
> 'users'. Would both feed off this single primary key table?

I use a sequence, but I use the same sequence across an application. It cuts
down on the number of objects I need to maintain, and makes it so that any
one table probably doesn't have too many consecutive primary keys. The same
would apply if you're building your own table to generate a sequential
primary key. Though, I really see no reason for building your own table when
sequences are so easy to use.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to