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:

  1. Navigate to the “Data Catalog,” select a system, and click on “Detail.” Constraints button

  2. Move to the “Constraints” section and click on the FAB button. Constraints creation

  3. 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)
  4. 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:

  1. Go to the constraints section of a system by clicking on the “Constraints” button.
  2. The dedicated section displays all constraints, allowing filtering by name, type, and schema. The download icon facilitates downloading a .CSV file containing all constraints. Constraints list

Visualization of a Physical Entity or Field

To visualize the physical constraints of a physical entity or field:

  1. Go to their detail section and select the “Constraint” tab.

  2. Constraints are grouped by type: “Foreign Key,” “Primary Key,” “Index,” and “Others.” Constraints Tab

  3. For foreign keys, clicking on the “Referenced” button displays all foreign keys referencing the current entity.

Constraints FK

Visualization of ER Diagram

To visualize the ER diagram of a physical entity:

  1. Go to the “CONSTRAINTS” section of the entity.
  2. Click on the icon shown in the figure to display the ER graph.

Constraints button

  1. The depth of the graph can be adjusted using the toggle button, Constraints button

  2. and details can be accessed through a right-click context menu.

Constraints button