Still confused where CMP and BMP fits in the following category :- Database dependent/independent Server or Container dependent/independent ..
What I read from cade's book was :-
CMP- Database independent and Server/container dependent BMP- Database dependent and Server/Container independent
But recently I read some contradictory statements about this in Whizlabs and now I am confused Can someone pls tell me whether this is right or not, and if so, why ??? [ June 29, 2005: Message edited by: Giju George ]
BMP is tightly coupled with database CMP is tightly coupled with container.
but in whizlabs, they often ask for the most appropriated answer, which does not mean the other is wrong.
For instance, using BMP reduces your ability to change for another database or it increase your ability to move from one container to other ?
Well i would say both. but in Whizlabs, although both answers are proposed, they claim that BMP reduces your ability to move from one database to another. They also add that the use of a DAO cancel this restriction.
You see, there is nothing clear. I really hope the sun exam will be much clearer and error-free : i am dreaming ?
Note: With a property file having the all the queries (FOR BMP). Your component can be database and container independent,this is the theory.
Performance - This is fishy. But for the exam, BMP is better than CMP.Because SQL can be tuned (Proven). Some container vendors generates good SQL queries. But not all.
ED Roman : CMP performs better than BMP. For a finder to work, it does n+1 query execution. But by tuning the container CMP can make this happen with a single query. This is possible using FAT KEY Design Pattern.