my dog learned polymorphism
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Joining Strategies Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Joining Strategies" Watch "Joining Strategies" New topic

Joining Strategies

Nikhil Jain
Ranch Hand

Joined: May 15, 2005
Posts: 385
Consider the following entity class hierarchy:

public abstract class Account{ }
public class CheckingAccount extends Account{ }
public class SavingsAccount extends Account{ }

Assuming that JOINED is used as Inheritance strategy, and all the three classes are Entity classes, which of the following is correct?

1. Two tables, one for SavingsAccount and one for CheckingAcount will be used.
2. JOINED is an invalid strategy for this scenerio.
3. Three tables, one for each class, will be used.
4. Only one table will be used.

Should the correct answer be 1 nstead of 3. Enthuware says 3 is correct?

SCJP 1.4, SCWCD 1.4, SCBCD 1.5
I agree. Here's the link:
subject: Joining Strategies
It's not a secret anymore!