Home > Back-end >  What kind of object relationship, do you often use?
What kind of object relationship, do you often use?

Time:10-26

Sector entities, corporate entities, they have a relationship between,
DeptDoc
Private int id;
Private String department;

EntDoc
Private int entid;
Private String entname;

There are three types of associated design:

A, ID associated company entity class,
Dept
Private int id;
Private String department;
Private String entid;

Second, the company objects to associations,
Dept
Private int id;
Private String department;
Private entDoc ent;

Three, or a company ID, add a redundant company Name attribute to link,

These three cases in that?

If the entity class association is very complex, and with that?