Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can OJB handle ternary (or higher) associations?

Associations ojb ternary
0
Posted

Can OJB handle ternary (or higher) associations?

0

Yes, that’s possible. Here is an example. With a ternary relationship there are three (or more) entities ‘related’ to each other. An example would be Developer , Language and Project . Each entity is mapped to one table (DEVELOPER , LANGUAGE and PROJECT ). To represent the combinations of these entities we need an additional bridge table (PROJECTRELATIONSHIP )with three columns holding the foreign keys to the other three tables (just like an m:n association is represented by an intermediary table with 2 columns). To handle this table with OJB we have to define a class that is mapped on it. This Relationship class can then be used to perform queries/updates as with any other persistent class.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123