[Zope] Sybase: How generate id keys? (surrogate keys)

Bill Anderson bill@libc.org
Tue, 21 Mar 2000 18:02:19 -0700


Hung Jung Lu wrote:
> 
> Hi,
> 
> How do people generate id keys (surrogate primary keys)
> in Sybase+Zope? There are some recommended ways of doing it
> in Sybase with stored procedures but I can't run stored
> procedures in Sybase.
> 
> I am looking at heavy-traffic strategies. So I need something
> slightly better than a simple increment table for the keys.
> 
> Any recommendations? Thanks in advance.

Does there have to be any meaning to the keys?

IOW, would a random, unique id work for you?

If so, you can take a look at:

http://www.zope.org/Members/Bill/Documentation/AutoGenID

For ways of doing it. You would insert the generated id into the SQL
table instead of the id field of a zope object.


-- 
In flying I have learned that carelessness and overconfidence are 
usually far more dangerous than deliberately accepted risks. 
          -- Wilbur Wright in a letter to his father, September 1900