Well, in UML terms, we would say that Rating can be designed as an association class. However, in
EJB we don't really have association classes. You can model them with an interposing class, which imitates the actual association.
Movies<->MovieRating<->User
The eventual question you would come across if you only had Movie and User as classes in your application is: if more than one movie can be rated, I obviously can't store the rating in the movie, if a user can rate more than one movie, I can't store it in the user. Ya gotta store it somewhere else. (Thus the association class).
In the end, if properly designed, you would be able to do something like this:
And there you have it. (I have no idea if this will compile.) This should be pretty close to what you are thinking in your head.
Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED