Home > Back-end >  The link between the objects, which do you prefer?
The link between the objects, which do you prefer?

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?
  • Related