Relationship between account and contact
There are four different kind of relationships in the force.com platform.
But I like to categorize them in a slightly different way than the help pages:
- Lookup
- Master-Detail
- Hierarchy
- Standard relationships
There are lot's of help topics and articles on Lookup and Master-Detail, such as the relationship overview and the relationship considerations topics in help. I don't like including Many-to-Many in this kind of discussion because, for all intents and purposes M:M is just an implementation of two M-D relationships (by strict reading of the docs), or possibly two lookup relationships or a mix of the two.
To dispense quickly with hierarchy relationships, these are a special lookup self-join relationship on the User object. Read up on those on your own. :-)
So let me talk about my own invented fourth category.
Standard Relationships
If we (salesforce.com) provide you with a relationship between two objects, that is a standard relationship. Not lookup, not master-detail. Why do I bother providing this fourth category? Because it is the easiest way to stop people trying to categorize them as either lookup or master-detail when they often share characteristics of both. When you approach working with any standard relationship the question you really need to answer is, "how does this standard relationship behave." Frequently standard relationships have characteristics that you just can't do with a custom relationship. Ever tried to make a custom relationship polymorphic? Go ahead...give it a try. You will fail. But there are many examples of polymorphic standard relationships.
I like to categorize these in their own separate place independent of lookup/master-detail. In fact, anything standard follows the same rule: it behaves exactly the way that salesforce.com wants it to behave to fit the particular purpose of that standard thing.
In my opinion, the Account-Contact relationship is a perfect justification for this fourth category: it is a little like lookup, a little like Master-Detail, but fundamentally behaves the way it does because we decided it should.
That might not be the "proper" way, as you ask, but it is the one that makes the most sense to me.
Contacts and Accounts have a lookup relationship but this relationship has a property called CascadeDelete set to true. This is why the contact is deleted when the parent object is deleted.
.
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.