2 Replies Latest reply on Jul 17, 2002 6:39 PM by jsimone

    Question on relationship design and associate attributes


      Suppose I have 2 entities, say PERSON and CAR and the relationship is many-to-many between them. That is, a person can own or drive many cars, and car may be driven by more than one person (not at the same time however!).

      How is that I would add attributes to this relationship and define my EJBs? I don't have the constraint of having to worry about a legacy DB. I can start with a clean set of tables. What would be the best way to model this associate attributes?

      CAR <---------------------------> PERSON
      FIRST_DATE-TIME_DROVE
      NUM_TIMES_DRIVEN
      AVG_MILES_PER_DRIVE
      AVG_SPEED_PER_DRIVE
      etc ...

      Many thanks in advance!

      Kind regards,
      joe