O'Reilly logo

Developing Applications with Java™ and UML by Paul R. Reed

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

Mapping Classes to Tables

The easiest way to translate classes into tables is to make a one-to-one mapping (see Figure 9-2). I strongly recommend against this approach, yet it is done more often than you might realize. One-to-one mapping can lead to the following problems:

Figure 9-2. Remulak class diagram

  • Too many tables: Most object-to-relational translations done with one-to-one mapping produce more tables than are actually necessary.

  • Too many joins: If there are too many tables, then logically there will be too many SQL join operations.

  • Missed tables: Any many-to-many association (e.g., Customer and Address) will require a third relational 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