O'Reilly logo

OCA Oracle Database 11g: SQL Fundamentals I: A Real-World Certification Guide by Steve Ries

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using sequences

In the previous chapter, we discussed two different methods for handling primary keys. Natural keys are key values that have actual meaning in the business model. They could include social security numbers or account numbers. However, our Companylink model uses synthetic keys—key values that are generated to maintain uniqueness. Using synthetic keys provides an easy way to guarantee uniqueness, although some object to the additional space required for non-business data. This is often a small price to pay for the usefulness of a synthetic key. Synthetic keys do, however, need to be generated. This can be done using programmatic techniques in the originating application. It can also be done using sequences. A sequence is a database ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required