Is the entity-beans rubbish?
Hi, all!
I'am a beginner EJB-developer. I'am seeking the place of using for the entity-beans. And I can't do it. The entity-bean's container encapsulates database level. "That's fine! If the business objects will be changed, I'll change several lines of my code only.", all say. I agree with it.
But...
Run a simple mental experiment.
Let the small or middle company has a trading system. This system includes several business objects, as follows: "The goods", "The customer", "The order". There are 46.000 goods, 350 customers and 2400 orders into the system. Each of them is a entity-bean...
Once day the chief will say to developer "Give me the report about customers, which: a)make their purchases during last year's may; b)the purchases from item (a) must contain the red caps; c)the average total cost of the last year's orders of the customers must be more than $1500... and so on". What is to be done? To make the complicated nesting loops? EJB QL's ability is not enough for this problem. But this problem is typically.
Databases (relation or OO) was developed especially for operation on the large data structures (remember indexing, table clustering and so on). I think, the using of entity-beans decreases the performance of the information system in many case, and gives very dubious advantage of DB encapsulating.
Am I wrong? ;0)

