[SalesForce] Look Up relation Vs Master detail relation

I have small doubt in choosing between look up field and master detail field.
I have a custom object say cObj1 which should always be related to some other object say cObj2. So I can opt for universally required look up field or a master detail relation. So what should be chosen and under what basis the choice is made ?If I make a universally required lookup field then it not at all allow deleting the parent object.On the other hand in case of md relation deleting the parent object deletes all the related child object. Is it is something that should be kept in mind before making the choice ?

Also how to make the choice if we have more such relationship required like there are 2 more objects cObj3 and cObj4 with which cObj1 should always be related.

Best Answer

Primary points in choosing MDR over lookup should be:

  • Does it make sense? Think about structure. What do the objects represent? When you insert a cObj2 does it depends on the related cObj1?
  • Roll-up summary. More often than not this is the cornerstone of my decision. Will you need (at any moment) to count, sum or loop through the child object?
  • Deleting childs. If a master record is deleted, all childs go along with it. Does it seems right for that relationship?
  • Security. In a MDR, the child sharing settings are inherited from the parent.