Re: IDS to DB2 conversion
Posted in 2004
Topics: General Discussion
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