(MSSQL/SYBASE) Identities and (Oracle) Sequences look interchangable at first
glance, but there is a not so obvious difference. A single sequence can be
used to provide unique key values across several tables. It is one sequence
of numbers. If a single sequence is used to generate keys for 2 tables, there
will never be a key collision either within or between the tables. If identities
are used, collisions are likely (between tables). Consider a case where identities
are used in a foreign key column that includes IDs from two tables. Such
practice requires the use of a table identifier of some sort... Don't laugh.
This is not just a "poor design". I have seen cases where this sort of difference
significantly affected porting time of perfectly functional systems.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center