Hi Manpreet ,
Account and contact behaves as master detail in business logics but on UI it is a lookup relationship. Let me explain you a bit more.
You can create a contact without filling account i.e it shows that there is a lookup relationship between account and contact.
If you have created a contact with account and you delete that account then contact will be deleted, this shows that it is in Master-Detail relationship. This is a standard behavior.
So we can say it in both ways, but it documentation it is a lookup relationship.
If you see the field definition, opportunity to account is a lookup field.
But in terms of business logic it behaves as Master-Detail one ….
e.g. you can create Rollup summary field in account, if an account is deleted then related opportunity will be deleted.
But in UI terms it behaves as lookup like its not mandatory to associate account on opportunity record.
It is standard behaviour in salesforce.
They are a unique category of fields commonly referred to as standard lookup fields. Unlike custom lookup fields, they generally have the “cascade deletion” property set to true, and unlike custom master-detail fields, they may have the “always required” property set to false. Also, these fields can restrict deletion of accounts when certain conditions are met.
It looks as a lookup relation but in back-end their properties are matched to master-detail relationship as I have mentioned above they have some special properties enabled to give it somewhat similar properties of master-detail but not completely it is a master-detail relation.
Hope this may solve your query:
Thanks.