axaptax++dynamics-365-operations

Table Cardinality in Microsoft Dynamics 365 F&O


When creating a table in Microsoft Dynamics 365 F&O there are two fields that confuses me and I can't find the right documentation to fullfill them. They are "Cardinality" and "Related table cardinality".

I've tried to search throught this link but couldn't find anything about cardinality.

For what I can supose, they can be used as it follows:

I'm supposing that "ZeroOne" would be "I'm zero and you are one" or "OneMore" would be "I'm one and you are more" line of thought.

But "ZeroMore" can't seem to fit in the usual database relationship since there are only two related table cardinality options: "ZeroOne" and "ExaclyOne".

Can someone find a better explanation for this or send me a propper documentation link?

Thanks in advance.


Solution

  • It can be confusing and the easiest way to figure it out might be just looking at tables and relations that you already understand the relationship.

    Table cardinality refers to the relationship between two tables in a database, which specifies how many records in one table can be associated with one or more records in another table. In other words, it defines how many instances of one entity can be related to how many instances of another entity.

    A good example of the cardinality is the PurchLine relation to PurchTable (\Data Dictionary\Tables\PurchLine\Relations\PurchTable).

    The cardinality of the PurchTable relation ON the PurchLine table is ZeroMore and it refers to the fact that you can have zero or more PurchLine records for a given PurchTable record, because you may create a PO without any lines.

    The RelatedTableCardinality refers to PurchTable, where there can be ExactlyOne PO header. You cannot have a PO line that exists across multiple PO's.