With oracle, you can use seqhilo
which uses a database sequence instead of a separate table. You get the advantage of hilo (in-memory key generation, no need for db roundtrip) and consistency (no separate transaction) at the same time.
source
to share