Relationship In Salesforce 1. Master-detail relationship 2. Lookup relationship 3. Self-relationship 4. External lookup relationship 5. Indirect lookup relationship 6. Many-to-many relationship (junction object) 7. Hierarchical relationship Master-detail relationship It is a strongly coupled relationship among Salesforce objects, which means if a master record gets deleted, then the child records associated with it are also deleted. In this type of relationship, the parent record controls the behavior of the child record regarding visibility and sharing . It means the security setting of a parent object applies to the child object. When there is a master-detail relationship between two objects, you can create a unique type of field over the master object, called Roll-up summary . A roll-up summary field allows us to calculate values from child records, such as the number of child records linked to a parent record. Lookup relationship It is a loosely coupled relations
Everything about Salesforce