Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What are sequences, and what are the possible problems when using them to create surrogate keys?

user-image
Question added by Emad Mohammed said abdalla , ERP & IT Software, operation general manager . , AL DOHA Company
Date Posted: 2014/12/26
Emad Mohammed said abdalla
by Emad Mohammed said abdalla , ERP & IT Software, operation general manager . , AL DOHA Company

A sequence is an object that generates a sequential series of unique numbers. Sequences are most often used to provide values for surrogate keys. However, there are three problems with using sequences. First, a developer can use a defined sequence for any purpose; and if a sequence is used for purposes other than the surrogate key, some values will be missing. A second problem is that there is nothing in the schema that prevents someone from issuing an INSERT statement that adds data to the table but that does not use the sequence. Finally, it is possible to use the wrong sequence when putting data into a table.

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.