Jackie Marino wrote:
>
> Does anyone have any advice/experience on using sequences as primary
> keys? We are going to use them for almost all of our tables and would
> like to know any potential problems.
>
> Thanks in advance,
> Jackie Marino
- Sequences are great if you are using just Oracle tools. If not, you
might run into problems with tools, ODBC drivers etc. that do not
support the special syntax. Using sequences might considerably increase
migration afford to non-Oracle DBMSs, as it involves special
CURVAL/NEXTVAL keywords and syntax, rather than just SELECTs of the next
value from the sequence object in the database.
- Sequences cannot be used if you need a sequence without missing
numbers, nor to indicate a particular order of assignment of keys to
entities, which is sometimes desirable in accounting software.
- Sequences cannot be used for cascading keys, i.e. to compose a key
from a "master" and a "sub" key.
Marcus Reichardt
Consultant
Received on Wed Jul 01 1998 - 08:02:03 CDT