OJB
Downloads
Documentation
Development
Translated (Web)
|
Introduction |
It is easy to use OJB with with database generated sequences. Typically a table
using database generated sequences will autogenerate a unique id for a field
as the default value for that field. This can be particularly useful if multiple
applications access the same database. Not every application will be using OJB
and find it convenient to pull unique values from a high/low table. Using a
database managed sequence can help to enforce unique id's across applications
all adding to the same database. All of that said, care needs to be taken
as using database generated sequences imposes some portability problems.
OJB includes a sequence manager implementation that is aware of database
sequences and how to use them. It is known to work against Oracle, SAP DB,
and PostgreSQL. MySQL has its own sequence manager implementation because it
is special. This tutorial will build against PostgreSQL, but working against
Oracle or SAP will work the same way.
Additional information on sequence managers is available in the
Sequence Manager documentation.
|
|