Monday, 15 June 2015

dynamics crm 2011 - How to differentiate M:N relationships without intersect tables from M:N relationships with intersect tables -


My goal is to get an invoice related to a given contact, if I get data from a table called "Contact Invoice" (Intersection table), then I think this table is empty. I solved this problem by requesting a record directly from the invoice table with "Contact" (contact) = "Price" (invoice). As I have now seen that this approach is good for contact and account tables and invoices and quotes. M: N: Relationships with M: How to Interrelate M: N Relationship without Intersection to Relationships

You have a lot of relationships without having an intersection table. Please review some conditions:

M: 1

For example customers take orders. A customer may have multiple orders, but one order can have only one customer (though many customers can have similar orders). It is obtained by order containing a customer ID.

M: n

For example take authors and books. A writer can write many books, and a book can be written by one or more writers. The book that a writer will not obtain this relationship, and this is where the contents table is required. It has a writer, and a book id. If two authors work on the same book, then the contents table will have two records with the same bookid, and different authors, thus M: N relationship will be allowed.

M: 1 & amp; M: N?

There are some different uses of the relationship if you can be both, for example, suppose you have contacts and orders, and the customer is a contact, and there are one or more sales reps in the order. Which handle the order. Now the contact table and the order table are related twice, the order table can contain the customer ID attribute, which is actually a foreign key for the contact table. However, there may be an intersection table of order and sales reps, in which case reps are foreign keys for the contact table again.


So how do you differentiate your question? If it has an intersection table, then it is an M: N relationship, if it is not, then it is not.

No comments:

Post a Comment