O'Reilly logo

Applied Enterprise JavaBeans™ Technology by Kevin Boone

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

11.6. Handling data sets with no natural primary key

This section is included here because it related equally to both container-managed and bean-managed persistence. However, the issues described are rather subtle, and you may prefer to come back to this section after reading about BMP and CMP (and/or writing some code!).

We have already discussed the importance of the notion of a ‘primary key’ to the entity EJB architecture. We must now examine ways to handle situations in which the data set has no ‘natural’ primary key—that is, for example, where no single column uniquely identifies a particular row in a database table.

If a database table does not have a natural primary key, we must find a way to generate one. Consider, for example, a table ...

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