Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
In a thread on IDS to DB2 conversion, Serge Rielau argued sequences are a functional superset of SERIAL/IDENTITY, useful for database-wide unique IDs and federation. Obnoxio The Clown doubted a relational database needs such IDs. Rielau said both work alike under the hood and asked how to turn a serial into a sequence. No conclusion.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
And what if you want a db-wide unique ID?
I like sequences better than SERIAL/IDENTITY they are a functional superset.
Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Serge Rielau wrote:
> And what if you want a db-wide unique ID?
> I like sequences better than SERIAL/IDENTITY they are a functional
> superset.
I must have been asleep in that class on relational theory.
--
"C'est pas parce qu'on n'a rien ' dire qu'il faut fermer sa gueule"
- Coluche
OTC = Joe Celko?? Nah...
As the local rebel without a cause shouldn't you be all in favor for
non-relational? ;-)
Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Serge Rielau wrote:
> OTC = Joe Celko?? Nah...
> As the local rebel without a cause shouldn't you be all in favor for
> non-relational? ;-)
Fooey to you sir! At what point was it specified that a relational database
requires a database-wide unique identifier?
--
"C'est pas parce qu'on n'a rien ''' dire qu'il faut fermer sa gueule"
- Coluche
Federation for example? Need in the middleware layer?
Also this is the principle of bang-for-the-buck.
I can tell you first hand that sequences and serial/identity are nearly
identical under the hood. But one gives more options than the other.
Personally I'm a fan of RISC. Use the least number of features that
yield the most function.
Sequence + before trigger = serial/identity
How do you go from a serial/identity to a sequence?
A major ISV asked us this question a few years back. I couldn't come up
with a good answer. Best I could propose was to use a table with serial
and keep inserting into it. Then garbage collect on occassion.
Got a better idea?
Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.