Virtual Relationships

Virtual relationships are used to link related entities based on a common attribute which helps in querying data and generating useful insights.

Consider entities that do not have relationships between them in the database. To derive insights from entities, we may need certain relationships in the data model while ensuring that the schema of the database remains the same.

To solve this problem, Astera Data Warehouse Builder offers virtual relationships that help us create relationships between entities and leverage the benefits of relationships without forward engineering them to the database. Virtual relationships have similar characteristics as physical relationships, but they are not present in the database.

Use Case

Consider an example where Customers and Orders tables are present in a database but are not connected with each other.

image-20230601224220125

A virtual relationship could be created between the entities using a common attribute such as the CustomerID. Virtual relationships between two entities can be marked as virtual using any of the following steps

  1. Right-click the relationship and select Virtual from the context menu.

image-20230601224252275

  1. Double-click the relationship to open the Edit Relationship window and mark the Virtual checkbox. Click OK to save the changes and close the window.

image-20230601224319813

  1. Open the Relationship Manager window either from the toolbar or using the short cut key, Ctrl + Shift+ E.

image-20230601224341790

  1. Now, select the relationship and mark the Virtual checkbox. Click OK to close the window.

image-20230601224354138

A virtual relationship between the Customers and Orders entities has been created successfully. This virtual relationship will not show any changes when applying diff nor will it give any verification errors when verifying for Read and Write Deployment.

image-20230601224436745

image-20230601224447127