This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Cross-database and cross-schema portability Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Cross-database and cross-schema portability" Watch "Cross-database and cross-schema portability" New topic
Author

Cross-database and cross-schema portability

Kingsly Theodar
Greenhorn

Joined: Feb 21, 2004
Posts: 19
Which object can be used to increase cross-database and cross-schema portability?
A. entity bean
B. home object
C. session bean
D. data-access object

The answer which I gave was "A. entity bean" but the correct answer as given by Sun is "Data-access object".

Could anyone explain why?

Thanks in Advance

Note:
This is a sample question given by Sun, which could be found at
http://stephane.weber1.free.fr/SCEA/Java/certification_archj2ee_07_01.pdf
Saha Kumar
Ranch Hand

Joined: Feb 23, 2006
Posts: 218
Hello Kingsly,

To me DAO is correct because you could use a DAO factory to supply a DAO for different databases (Oracle, Sybase, etc.) as need be.

-Saha
Kingsly Theodar
Greenhorn

Joined: Feb 21, 2004
Posts: 19
Thanks Saha.

But is it not that, even CMP (Entity Beans) also takes care of doing the same?
Thomas Taeger
Ranch Hand

Joined: Dec 16, 2002
Posts: 307
Originally posted by Kingsly Thewdar:
Which object can be used to increase cross-database and cross-schema portability?
...
... the correct answer as given by Sun is "Data-access object".

I suppose Sun (or the specific author) is wrong here. In a DAO you must rely on the vendor specific SQL dialect. MS-SQL Server dialect will not be understood by Oracle and vice versa.

So the right answer realy might be Entity EJB - with standardized EJB QL instead of theoretically standardized but violated SQL.

Session EJBs can not help in this point because
1. they should not access the data tier directly and
2. even if they would their SQL statements would need to be as vendor specific as those of DAOs.

Thomas


www.classic-and-class.com - www.evalulearn.com
Interfaces are the glue of OO.
 
 
subject: Cross-database and cross-schema portability
 
Similar Threads
My SCEA Part 1Study Notes
Passed SCEA Part1
Which SCEA Objective is right.
SCEA Resource
Passed SCEA