Constraints, Foreign keys, ER diagrams
Physical Constraints in Blindata
Physical constraints in Blindata represent rules within a physical system, defined based on the values represented by a physical entity or a physical field. There are predefined types of physical constraints, including Primary Key, Foreign Key, Index, Unique, Not Null, Check, and Default. Blindata also allows users to specify custom physical constraint types based on their needs.
Every physical constraint encompasses a set of target physical fields or entities, defining the entities on which the rule of the physical system is applied. It is also possible to define the set of referenced physical fields or entities, enabling features such as ensuring referential integrity for the “Foreign Key” type.
Definition of a Physical Constraint
Constraints are typically generated automatically through metadata harvesting, although they can also be manually created and managed as needed. To manually add a new physical constraint:
-
Navigate to the “Data Catalog,” select a system, and click on “Detail.”
-
Move to the “Constraints” section and click on the FAB button.
-
The physical constraint creation modal will open, allowing specification of:
- System (mandatory)
- Name (mandatory)
- Schema (mandatory)
- Description (optional)
- Type (mandatory)
- Clause (database clause)
- Access Method (method used to access the constraint)
- Update Rule (action taken when the referenced entity is updated)
- Delete Rule (action taken when the referenced entity is deleted)
- Physical Fields Constraints (applied physical fields)
- Physical Entities Constraints (applied physical entities)
-
Click on the “Save” button to save the physical constraint.
It is also possible to create a new physical constraint from the detail pages of physical entities and physical fields by navigating to their respective “Constraints” tabs.
Visualization of Physical Constraints
Visualization within a System
To visualize all physical constraints within a system:
- Go to the constraints section of a system by clicking on the “Constraints” button.
- The dedicated section displays all constraints, allowing filtering by name, type, and schema. The download icon facilitates downloading a .CSV file containing all constraints.
Visualization of a Physical Entity or Field
To visualize the physical constraints of a physical entity or field:
-
Go to their detail section and select the “Constraint” tab.
-
Constraints are grouped by type: “Foreign Key,” “Primary Key,” “Index,” and “Others.”
-
For foreign keys, clicking on the “Referenced” button displays all foreign keys referencing the current entity.
Visualization of ER Diagram
To visualize the ER diagram of a physical entity:
- Go to the “CONSTRAINTS” section of the entity.
- Click on the icon shown in the figure to display the ER graph.
-
The depth of the graph can be adjusted using the toggle button,
-
and details can be accessed through a right-click context menu.