Logo
Logo
Installing Foreign Key.en

Setting a foreign key #

Setting foreign keys creates a relationship between objects.appear Dependent objects (children) and those with dependencies (base). Setting foreign keys is the process of creating a link from a child to a base object.

In SQL, a foreign key is a reference to the primary key of the underlying object, and only a table can have a primary key. In Outline, a virtual foreign key can refer to a view if it has a virtual primary key.

The following types of links are possible:

  • a table refers to a table;
  • the table refers to the view;
  • the view refers to the table;
  • the view refers to the view.

Virtual keys are not displayed in the database.

  1. Go Image [Menu] > [Configuration] > [Entities] > [Selected entity] > [Properties](or [Configuration] > [Schemas] > [Selected scheme] > [Entities] > [Selected entity] > [Properties]).

  2. In the detailed form, press the button Image [Edit] to switch to edit mode.

  3. Set the flag in the field * “Is foreign key” * and fill in the required field: * “Reference entity” *. Description of all fields in Properties/Columns.

  4. Click the button Image [Save] to save changes or click Image [Cancel] to exit edit mode without saving.