You can use master-detail relationships to model many-to-many relationships between any two objects. A many-to-many relationship allows each record of one object to be linked to multiple records from another object and vice versa. For example, you create a custom object called “Bug” that relates to the standard case object such that a bug could be related to multiple cases and a case could also be related to multiple bugs. When modeling a many-to-many relationship, you use a junction object to connect the two objects you want to relate to each other.
Please refer this link
https://success.salesforce.com/answers?id=90630000000hVj3AAE
and go for Deepak anand article
Please let me know if it helps
thanks
I gone through your problem.
You can use master-detail relationships to model many-to-many relationships between any two objects. A many-to-many relationship allows each record of one object to be linked to multiple records from another object and vice versa. For example, you create a custom object called “Bug” that relates to the standard case object such that a bug could be related to multiple cases and a case could also be related to multiple bugs. When modeling a many-to-many relationship, you use a junction object to connect the two objects you want to relate to each other.
You can refer bellow link:-
https://subscription.packtpub.com/book/big_data_and_business_intelligence/9781786463180/1/ch01lvl1sec13/types-of-relationship-in-salesforce
https://help.salesforce.com/articleView?id=relationships_manytomany.htm&type=5
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com