Wednesday, December 6, 2017

Relationships between entities

We can build three types of relationships between entities.

  1. One-to-many
  2. Many-to-One
  3. Many-to-many

I would like explain these relationships with an example. Assume there are two entities called A and B. As per the requirement A record can contains more than one B records, that means we need to create a one-to-many relationship between A and B, once you create the relationship, one A entity related lookup field will be created automatically in B entity. So, for each record you are creating in B entity you will selecting the respective A entity related record. One each record of A entity, you can see all the associated records of entity B in associated view.

Many-to-one is same as One-to-many if we are following above process from B to A.

The records for a many-to-many relationships are stored in an intersect entity which contains the ID of both the referenced and referencing records. In Many to many relationships we need to establish a link between records by associate or disassociate.

No comments:

Post a Comment