web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Relationships definition

(0) ShareShare
ReportReport
Posted on by 515

hi all

What is 1:N, N:1 and N:N relationships?

I can see this when i want to create new attributes.

Please help

Rangers

 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Sreevalli Profile Picture
    3,256 on at
    RE: Relationships definition

    Hi,

    There are 3 type of relationships exist in between CRM Entities.

    When you say 1 to N between Company and Employee that mean one Company can have N number of Employees. Which is also means N to 1 between Employee and Company.

    When you create a lookup field then it will ask for reference entity., that means your entity from which you are creating lookup field will stand on N side and referring one will stand on 1 side of N to 1.

    go through below link for understanding of relationships.

    https://docs.microsoft.com/en-us/dynamics365/customer-engagement/customize/create-and-edit-1n-relationships 

    https://community.dynamics.com/365/b/softchiefmicrosoftdynamics365/archive/2017/08/23/dynamics-365-crm-entity-relationships-understandings 

  • Inogic Profile Picture
    639 on at
    RE: Relationships definition

    Hi Ranger,

     

    You are may be familiar with SQL tables. CRM relationships are similar to how we create relationship in SQL between two tables.

     

    In SQL,

    1.       For 1:N or N:1 Relationship -

    The 1:N relationship is defined as a relationship between two tables where a row from one table can have multiple matching rows in another table. This relationship can be created using Primary key-Foreign key relationship.

    For ex., there are two tables in SQL

    1)      Country

    2)      States

     

    Between Country and States table there is 1:N relationship, so one Country can have multiple States. In States table “countryid” is a foreign key which is a primary key of Country table.

     2.       For N:N Relationship -

    In a N:N relationship, a row in table A can have many matching rows in table B, and vice versa. The N:N relationship could be thought of as two one-to-many relationships, linked by an intermediary table. The N:N relationship is used when you are in the situation where the rows in the first table can map to multiple rows in the second table and those rows in the second table can also map to multiple (different) rows in the first table.

    For ex., We have two tables,

    1). Teacher

    2). Classes

    Between Teacher and Classes table there is N:N relationship, so one teacher can be assigned to many classes and one class can be assigned to many teachers.

    In Dynamics 365, We use Entity as a table.

     

    1) 1:N or N:1 Relationship -

    An entity relationship where one entity record for the Primary Entity can be associated to many other Related Entity records because of a lookup field on the related entity. When viewing a primary entity record you can see a list of the related entity records that are associated with it.

    Similarly we have same tables (Entity) (i.e. Country and States) in CRM also. So country (Primary entity) can have many related States associated with it.

     

    2)  N:N Relationship

    An entity relationship that depends on a Relationship Entity, called as Intersect entity, so that many records of one entity can be related to many records of another entity. When viewing records of either entity in a N:N relationship you can see list of any record of the other entity that are related to it.

    Here we have same tables (Entity) (i.e. Teachers and Classes) in CRM also which have N:N relationship. So one teacher can be associated to many classes and one class can be associated to many teachers.

    Hope this helps.

    Thanks!

  • Leon Tribe Profile Picture
    7,034 on at
    Re: Relationships definition

    Here is an example of a 1:N. "A company has many employees but an employee only ever works for one company"

     Company = 1
    Employee = N

    From the employee's perspective this is also an N:1

    An example of an N:N would be "A borrower borrows many library books and a library book may have had many borrowers"

    However, by virtue you are not sure of the meaning suggests you should learn more before going near the back end of CRM. Understanding how to use a knife and knowing where the brain is does not make you a brain surgeon. While customizing CRM is not brain surgery I do wholly support Neil's suggestion you get a good book on Dynamics CRM before clicking into the Settings-Customization area.

    Leon Tribe
    Want to hear me talk about all things CRM? Check out my blog
    http://leontribe.blogspot.com/ 
    or hear me tweet @leontribe

     

  • Neil Benson Profile Picture
    7,369 User Group Leader on at
    Re: Relationships definition

    Hi Ranger, for a full explanation of how to customise CRM, the best thing to do is to start with a CRM book. There are several good titles available at Amazon and other book sellers. There are also lots of training resources available on CustomerSource or from your Microsoft CRM partner.

    Regards, Neil

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
Christoph Pock Profile Picture

Christoph Pock 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans