<< Click to Display Table of Contents >> Relationship types |
Bizagi offers four types of relationships between entities, providing greater flexibility in your data model.
This is the most common relationship in which one instance of an entity is associated with one instance of another entity.
What distinguished this relationship is the order in which it is created; mainly because it creates an attribute in one entity in reference to another but NOT both ways.
It is commonly used for relationships between a master entity and a parameter entity for drop-down lists (or combos) and between master entities.
These type of relationship is automatically created through the Data Model Wizard, when choosing the Entity type attribute.
For example a Customer has one gender, thus there is a Related Attribute between Customer and Gender entities. However a gender will be assigned to many customers. The Related Attribute relationship creates an attribute in the Customer entity, shown under Relations, to reference the Gender (not both ways). You cannot reference a particular Customer from a Gender. The relationship is modeled as a single arrow line.
A one-to-one relationship is established when there is a single correspondence between two entities. In this type of relationship, each record in Entity A is associated with exactly one record in Entity B, and vice versa. For instance, consider two entities: Employee and Computer. Each employee is assigned precisely one computer, and each computer is allocated to only one employee. This scenario illustrates a typical one-to-one relationship.
In Bizagi, only one one-to-one relationship is supported between the same two entities. Keep this in mind when designing your data model. |
When you create a one-to-one relationship, Bizagi automatically generates the necessary attributes (foreign keys) to connect the entities. These attributes are added to each entity and appear under their respective Relations nodes, referencing the other entity. Bizagi also ensures that these relationships are validated in both directions.
Visually, a one-to-one relationship is represented in the model by a double-arrow line.
To create a one-to-one relationship, open the second step of the Process Wizard: Model Data.
The entities to be related should be included in the diagram.
1. Click the Relationship button in the Home tab and select the two entities to be related.
2. Select the relationship type and click Finish
A one-to-many relationship is established when one instance of an entity (entity A) can be associated with zero, one or many instances of another entity (entity B). However, for one instance of entity B there is only one instance of entity A.
In Bizagi, this relationship is called a Collection.
For example, imagine there are two entities: Customer and Requested Products. The Customer (entity A) can have many Requested Products (entity B), but those products that where requested can only belong to one customer.
These type of relationship is automatically created through the Data Model wizard, when selecting the Collection type attribute. A collection is modeled as a single arrow line with an asterisk (*). Note that no attributes are created and shown under Relations of the Customer entity for this relationship.
Bear in mind that when deleting a one-to-many relationship, the foreign attribute is not deleted automatically. Due to data integrity measures, the foreign attribute created must be deleted manually. |
A multiple-to-multiple relationship is established when one instance of an entity (entity A) is associated with one, zero or many instances of another entity (entity B), and one instance of entity B is associated with one, zero or many instances of entity A.
For example, in a Loan Request Process, a request may have several products (personal loan, credit card) and several collaterals, or guarantees to cover the products (co-borrower, mortgage). Each product may have many associated guarantees. Thus, there is a multiple to multiple relationship between GuaranteesRequest and ProductsRequest: A product can be covered by several guarantees of the request, and a guarantee can cover several products of the request. A many-to-many relationship is modeled as a double arrow line with an asterisk (*) at each arrow end.
To create a multiple to multiple relationship open the second step of the Process Wizard: Model Data.
The entities to be related should be included in the diagram.
1. Click the Relationship button in the Home tab and select the two entities to be related.
Then click Next.
2. Select the relationship type.
Then type the names for both sides of the bidirectional relationship.
In the example the relationship between the request products and its guarantees will be Product_Guarantee.
The relationship between the guarantees and their covered products will be Guarantee_Products
Then click Finish.
Last Updated 12/16/2024 10:31:46 AM