Mapping strategies

Application Developer supports three mapping strategies for entity beans and relationships:

  • Top-down— From entity beans to new tables

  • Bottom-up— From existing tables to new entity beans

  • Meet-in-the-middle— Map entity beans to existing tables

Figure 12-1 summarizes the three approaches.

Figure 12-1. Mapping strategies for CMPs

In the sections that follow, we look at the three strategies in detail.

Top-down

The top-down approach is the easiest to handle, because no legacy database is imposed on you (Figure 12-2). You have full freedom to design the entity beans.

Figure 12-2. EJB mapping: top-down approach

The top-down approach ...

Get EJB 2.0 Development with WebSphere Studio Application Developer now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.