PL400 : configure relationships and types of behaviors (Implement tables and columns)
The concept of relation (database relation) was given by E F Codd in 1970 and nowadays, it is the soul of database. Relationships are a logical relationship between different tables, which is established on the basis of the interaction between these tables. Relationship helps to make more efficient and scalable solution. Microsoft Dataverse is a relational database that is managed by Microsoft in the cloud.
There are two types of table relationships:
One-to-many relationships(1:N or N:1):
A primary can be associated with multiple reference (related) tables. The primary table row is sometimes referred to as the "Parent" and rows of related table are called as "Children". The N:1 (many-to-one) relationship type exists in the user interface because the designer shows you a view grouped by tables. 1:N relationships actually exist between tables and refer to each table as either a Primary/Current table or Related table.
- A parent table can be zero, one, or many records of a related entity
- Related entity has a lookup field to store the GUID of the parent record
- N:1 is a 1:N relationship viewed from the other side.
Many-to-Many Relationship (N:N):
A many-to-many relationship occurs when multiple records in one table are associated with multiple records in another table. In the Dataverse, A hidden intersect entity is automatically created that has a 1:N relationship from each of the N:N entities and it can not be viewed or customized.
The Power platform natively supports the following relationships: one-to-many, many-to-many, and many-to-many.
Relationship behavior is most important feature in the data modeling because it helps to ensure data integrity, business automation and how CRUD operation impact the related table data.
Relationship behavior is combination of actions and cascade type.
There are four type relationship behavior in the Dataverse:
- System
- Parental
- Referential
- Custom
- These relationships are created and managed by Dataverse and can't be modified or removed.
- If parent is deleted, assigned or shared then child records are also affected
- Data is related but we don't want action on the related records to affect the other.
- On this behavior we can also set it to restrict delete which allows primary records as long as related data data exists.
- Cascade Active: Perform the action on all active related table rows.
- Cascade All : Perform the actions on all related table rows.
- Cascade None: Do Nothing.
- Remove Link: Remove the lookup value for all related rows.
- Restrict : Prevent the primary table row form being deleted when related table rows exist
- Cascade User Owned : Perform the action on all related table rows owned by the same user as the primary table rows.
- Field Mapping
- Navigate pane options of model-driven App.
- Relationship behavior
- Whether the relationship is hidden in Advance Find.
- Make a Hierarchical Relationship
- The data type must match.
- The length of the target field cannot be shorter than the source field.
- The format should match.
- The target field must not be used in another mapping.
- The source field must be visible on the entity form.
- The target field must be a field a user can enter data into.
- Address ID values cannot be mapped.
- Only one (1:N) self-referential relationship per table can be set as hierarchical. In a self-referential relationship the primary table and the related table must be of the same type.
- A hierarchy or visualization is based on one table only.
- The maximum number of columns that can be displayed in a tile is three with Unified Interface and four with the legacy web client. If you add more columns to the Quick Form that is used for the tile view, only the first three columns will be displayed.
Comments
Post a Comment