When installing foreign keys, a relationship is created between objects. Dependent objects (child objects) and dependent objects (base objects) appear. Setting foreign keys is the process of creating a link from a child object to the base object.
In SQL, a foreign key is a reference to the primary key of the base object, and only a table can have a primary key. In “Abris”, a virtual foreign key can refer to a view if it has a virtual primary key.
The following types of connections are possible:
- the table refers to the table;
- the table refers to the view;
- the view refers to a table;
- the view refers to the view.
Virtual keys are not displayed in the database.
Go to [Menu] > [Configuration] > [Entities] > [Selected entity] > [Properties](or [Configuration] > [Schemas] > [Selected scheme] > [Entities] > [Selected entity] > [Properties]).
In the detailed form, click [Edit] to switch to edit mode.
Set the flag in the field “Is foreign key” and fill in the required field: “Reference entity”. Description of all fields in Properties.
Click the button [Save] to save changes or click [Cancel] to exit the edit mode without saving.