Some properties in table relation - Song Nghia - Microsoft Dynamics Partner

Song Nghia - Microsoft Dynamics Partner

Song Nghia - Microsoft Dynamics Partner


Sunday, September 25, 2022

Some properties in table relation

 Some properties in table relation

Nghia Song -  Microsoft Dynamics 365 Technical Consultant

Nghia Song

Tel - WhatsApp: +84967324794


- a relation between two tables is the fundamental way of describing how we view the data in a relational database; - a relation is actually a column (FK - foreign key) on the second table pointing to a column (PK - primary key) in the first table, field that identifies uniquely a record; - one table can be seen as the parent table and the other one, that will hold the relationship to the child table; - you would create the relation always on the child table; - the cardinality concept simply talks about how many records from the table in discussion we can have pointing to one record in the other table; we always relate as we would have one record in the other table, and looking from its perspective to the other; - The Cardinality property refers to the table you are creating the relation on, so that would be the child table; the values for the cardinality can be: ZeroOne, ExactlyOne, ZeroMore, OneMore. So, while on any record in the child table you could set the related columns value to point to one record in the parent table, you could actually have more child records looking at the same parent record, so from here the options above; - The RelatedTableCardinality property refers to the parent table; the values can be: ZeroOne, ExactlyOne. Let us explain them. So for every child, you could have a parent for it or maybe no parent. If the relation's column would be mandatory, that means that from a design point of view your parent would always be required, so that would make it an ExactlyOne. Now, this leads to the third property we have to set which is RelationshipType covered in the next post. Thanks:

No comments:

Post a Comment