File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Joining Strategies

 
Nikhil Jain
Ranch Hand
Posts: 389
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic