This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan 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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cross-database and cross-schema portability
 
Similar Threads
Passed SCEA Part1
SCEA Resource
Passed SCEA
Which SCEA Objective is right.
My SCEA Part 1Study Notes