Skip to content
Logo

Database management

The Abris platform allows you to create objects through the web interface without using program code.Thus, each user can add / modify tables, schemes, taking into account their needs, without resorting to the services of developers.

Create a new schema

Creating schemas allows you to logically separate sets of objects in a database.These objects include: tables, links, triggers, and others.

  1. To create a scheme, go to the "Schemes" menu section and select "Add" at the bottom of the list.

  2. In the form that opens, fill in the "Schema Name" and "Title" fields.

  3. Click "Create."

Создание новой
схемы

After that, the circuit will appear in the circuit list.The parameter "schema_id" is generated automatically.

Результат создания
схемы

In the scheme

  1. It is necessary to go to the "Schemes" menu section and select the scheme to which the table should belong.

  2. In the object that opens, select the "Entities" item and click "Add."

Создание новой таблицы через раздел
"Схемы"

  1. In the form that opens, fill in the fields "Table", "Title" and select "Type" from the drop-down menu.

  2. Click "Create."

Успешное создание новой
таблицы

After that a new table will be created.You can verify this by the inscription "Add successfully" or by looking at the "Entities" item in this diagram.The created table will automatically appear in this section.

If you click on the created table, you will notice that the fields "Identifier" and "Primary Key" were created automatically.

Поля новой
таблицы

In essence

  1. You must go to the "Entities" menu section and select "Add" at the bottom of the list.

  2. In the form that opens, fill in the fields "Schema", "Table", "Title", and select "Type" from the drop-down list.

  3. Click "Create."

Создание новой таблицы через раздел
"Сущности"

It is important to note that in this method, you must specify the "Schema" to which the table will belong.

After that, the table will appear in the list of entities.The parameters "Identifier" and "Primary key" are generated automatically.

Параметры новой
таблицы

Adding columns to a table

You can add columns to the table by going to the object in several ways:

  • In the "Schemas" menu section, select the desired scheme and in the "Contains Entities" panel go to the desired table, then select the "Columns" subsection.

  • In the "Entities" section and find the desired table in the list, then select the "Columns" subsection.

`` `{= html}

- In the "Columns" section.> Further actions are carried out similarly, but with some> features, depending on the method.### Adding diagrams and entities from the section 1. Go to the "Columns" subsection.2. Click "Add" and fill in the "Name", "Title" and "Type in the database" fields in the form that appears.! [Completed upload form] (https://abris.site/docs/img/create_new_column_entity_1.png) 3. Click "Create".After that, a new column will appear in the list of columns.! [Created column] (https://abris.site/docs/img/create_new_column_entity_2.png) `` {= html} <! - ## Adding from table settings (not created) ->

Adding columns from a section

  1. Go to the "Columns" section.

  2. Click "Add" and fill in the fields "Entity", "Name", "Title", "Type in the database", "Type when displayed" in the form that appears.

Заполненная форма
добавления

  1. Click "Create."

Созднанная
колонка

Adding a column - foreign key

An important ability of the Database is the lack of data duplication.This can be achieved through the use of foreign keys.

  1. The creation of a foreign key is similar to adding columns to the table, however, at the stage of filling in the fields, the following fields are filled in: "Name", "Type when displayed", "Type in the database", "Header", "Linked Entity".

Adding fields containing a foreign key is carried out only through entities, but not through projections.

  1. Click "Create."After that, the column will be displayed in the table.

Создание колонки - внешнего
ключа

  1. First the fields will be empty.In order to fill them out, click on the desired line and in the corresponding field select the desired value from the list of available ones.

Новая колонка
взаимосвязи

To configure the display of values ​​in a dependent object, see Configuring Reference Fields .

Change columns in a table

Changing the basic settings of columns in tables can be done by going to the object in several ways:

  • In the "Schemas" menu section, select the desired scheme and in the "Contains Entities" panel go to the desired table, then select the "Columns" subsection.

  • In the "Entities" section and find the desired table in the list, then select the "Columns" subsection.

`` `{= html}

- In the "Columns" section.> Further actions are carried out similarly, but with some> features, depending on the method.! [Change columns from the entity section] (https://abris.site/docs/img/edit_column_entity_1.png)! [Change columns from the column section] (https://abris.site/docs/img/edit_column_property_1.png) Through this item you can configure the basic parameters of the columns, such as "Type on display", "Type in the database", "Visibility", "Non-reducibility", "Heading", "Related Entity", "Order" and "Optional".- The "Type on display" parameter changes the appearance of the output data.- The parameter "Type in database" indicates the type of output data.- The "Visibility" parameter enables or disables the display of this column in the user’s table.- The "Non-Redundancy" option allows or prohibits editing the column data.- The "Heading" parameter changes the column heading when displayed in the table.- The "Linked Entity" parameter contains the table or view that this field is associated with (for example, a foreign key).- The "Order" option allows you to reorder the columns.- The "Optional" parameter allows or denies leaving the field value empty.Removing columns ---------------- 1. In order to remove a column from a table in the "Entities" section of the menu, select the table and then select the "Columns" subsection (or find the column in the section "Columns").! [Removing columns from the table] (https://abris.site/docs/img/remove_column_entity_1.png) 2. In it, select the desired column and click "Delete".! [Removing columns from the table] (https://abris.site/docs/img/remove_column_entity_2.png) After that, the column will be deleted from the table.> You cannot delete table columns through projections.Deleting tables --------------- 1. Deleting tables can be done through the sections "Schemes" or "Entities".! [Removing a table from entities] (https://abris.site/docs/img/remove_table_entity_1.png) 2. Just go to the object of the desired table and select "Delete" under the table.Dependency Configuration ---------------------- Tables can be linked using a foreign key.In this case, there are dependencies between them.Dependency parameters can be configured.1. In order to go to the dependency parameters, you must go to the table on which another table depends.2. Then click on the "Contextual Actions" button --- \> "Settings" --- \> "Dependencies".You can change the following parameters: "Title", "Dependent projection", "Non-edibility", "Visibility", "Openness", "Order", "Hint".- The "Heading" parameter changes the column heading when displayed in the table.- The "Dependent Projection" parameter contains the title of the projection, which depends on the given one.- The "Non-Redundancy" option allows or prohibits editing the column data.- The "Visibility" parameter enables or disables the display of this column in the user’s table.- The Open option allows or disables the openness of table objects when moving to table data.- The "Order" option allows you to reorder the columns.- The "Hint" parameter, when filled, displays a hint window when you hover over the column data.Creating projections ----------------- If you want to restrict the user to columns, you can use the view.However, when you create it, you need to clearly know the list of names of all the fields that you need to specify.For convenience, projections are implemented in the platform.They allow you to quickly create access policies by column.1. Go to the desired table, and then click on the "Contextual Actions" button --- \> "Settings", then click on the link of the "Entity" field --- \> "Projections" (or go to the "Projections" section) .2. Click "Add."3. Fill in the fields "Projection", "Title", "Transition", "Primary Key".- The "Projection" field contains the name of the projection, which it will have in the program.- The "Baseness" field is checked if the projection needs to be made basic (by default, the base projection is created automatically when creating the entity).- The "Title" field indicates the title of the projection, as the user will see it.- The "Transition" field contains the entity to which the transition will be carried out when opening the detailed form.- The Primary Key field contains the key from the entity in the Transition field, which will be used as the primary one.- The "Additional parameters" field contains (if necessary) a program code in which you can specify additional processing for the fields.- The "Non-Redundancy" field contains a flag if the projection needs to be closed for editing.! [Creating a new projection] (https://abris.site/docs/img/create_projection_1.png) 4. Click "Create".! [Parameters of the new projection] (https://abris.site/docs/img/create_projection_2.png) Setting projection parameters ------------------------ ----- You can change the following parameters: "Title", "Display Type", "Non-editable", "Visibility", "Order", "Attachment", "Hint", "Optional".- The "Heading" parameter changes the column heading when displayed in the table.- The "Display Type" parameter changes the appearance of the output data.- The "Non-Redundancy" option allows or prohibits editing the column data.- The "Visibility" parameter enables or disables the display of this column in the user’s table.- The "Order" option allows you to reorder the columns.- The "Attachment" parameter attaches the two fields of the table so that they are displayed through the "/" symbol.- The "Hint" parameter, when filled, displays a hint window when you hover over the column data.- The "Optional" parameter allows or denies leaving the field value empty.! [Projection setting] (https://abris.site/docs/img/setting_projection_1.png)> Among the dependency parameters there is such a parameter as "Virtual".> It cannot be changed, it appears automatically when creating> virtual dependency.This means that a virtual (not created in> database) field is created by a view based on a table.! [New projection options] (https://abris.site/docs/img/setting_projection_2.png) Creating a new view ------------------------ ----- 1. To create a view, go to the "Entities" menu section and select "Add" at the bottom of the list.2. In the form that opens, fill in the fields "Schema", "Table", "Title", "Type", "Description".- The “Scheme” field contains the name of the schema to which the view will belong.- The "Table" field contains the name of the view in the system.- The "Title" field contains the title that will be displayed to the user.- The "Type" field is a drop-down list.When creating a view, select "View" from the list.- The Description field contains an SQL query to retrieve data.3. Click "Create."After that, the view will appear in the list of entities.The "Identifier" parameter is generated automatically, in the Description field, all specified columns will appear (provided that the symbol \ "\ *" was specified in the request instead of the fields), and columns from the object specified in the description appear in the "Columns \" subsection.Setting the primary key ------------------------ Views do not have a primary key, but in order to work with them as with tables, it is necessary that it be .1. In order to set the primary key for the presentation, go to the "Entities" menu section and select the desired view from the list.2. In the "Primary key" field, specify the field that will be the primary key.`` `= {html} <! -! [Primary key parameters] (https://abris.site/docs/img/set_primary_key_1.png) ->
  1. Click "Save."

`` `{= html}

If everything is entered correctly, the corresponding inscription will appear in the right upper corner, and when you go to this view, the data will appear in it.Setting foreign keys ---------------------- When you install foreign keys, a connection is created between the objects.Dependent objects (children) and those that have dependencies (basic) appear.Creating foreign keys is the process of creating a link from a child to a base object.The following types of relationships are possible: - a view refers to a table;- submission refers to the submission;- the table refers to the view.The process of setting foreign keys for all relationships looks similar: 1. In order to set a foreign key for a table (view), go to the "Entities" menu section and select the desired table (view) from the list.2. Go to the "Columns" subsection and select the column, the data to which will come from another object.Indicate in the field "Related Entity" the view (table) from which the selected field takes data.In the "Entity key" field, specify the field from which information is taken in the selected view (table).3. In the "Display type" and "Type in the database" fields, replace the values ​​with "ref List" and "uuid".4. Click "Save."If everything is entered correctly, then in the table (view) all the data will be correct, and the links working.To configure the display of values ​​in child objects, see [Setting reference fields] (tasks / Setting-reference-fields).Creating virtual dependencies --------------------------------- There can be no dependencies between the view and other objects, since when creating submissions to him are not transferred to the table relationships on the basis of which they were created.Therefore, to connect views with other objects, you can configure virtual dependencies that allow the view to be on a par with tables and other entities.When creating dependencies, a process similar to creating a foreign key occurs.Dependent objects (children) and dependencies (base) appear.Creating dependencies is the process of creating a relationship from a base object to a child.Dependence of the view on the table ------------------------------------ 1. In order to create the dependence of the view on tables, go to the "Tables" menu section and select the desired table from the list.2. Go to the "Dependencies" section and click the "Add" button.3. It is necessary to fill in the fields: "Dependent Entity", "Title", "Key Field", "Virtualization", "ref \ _key".- In the "Dependent Entity" field, it is necessary to select the view that needs to be made dependent from the drop-down list.- In the field "Key field" enter the key field from the dependent object.- The "daw" symbol must be indicated in the "Virtualization" field.- In the field "ref-key" enter the connecting field of the base object.`` `{= html} <! -! [View dependency settings on the table] (https://abris.site/docs/img/dependence_view_from_table_1.png) ->
  1. Click "Create."

`` `{= html}

> Before creating a dependency, it is necessary to check the presence of the> primary key of the view.The dependence of the table on the view ------------------------------------ 1. In order to create the dependence of the table on views, go to the "Tables" menu section and select the desired view from the list.2. Go to the "Dependencies" section and click the "Add" button.3. It is necessary to fill in the fields: "Dependent Entity", "Title", "Key Field", "Virtualization", "ref \ _key".- In the "Dependent Entity" field, you must select the table from the drop-down list that you want to make dependent.- In the field "Key field" enter the key field from the dependent object.- The "daw" symbol must be indicated in the "Virtualization" field.- In the field "ref-key" enter the connecting field of the base object.`` `{= html} <! -! [Parameters of the dependence of the table on the presentation] (https://abris.site/docs/img/dependence_table_from_view_1.png) ->
  1. Click "Create."

`` `{= html}

> Before creating a dependency, you must definitely check for the presence of> primary key in the views.Dependence of presentation on presentation ------------------------------------------ 1. In order To create a dependency of a view on a view, go to the "Tables" menu section and select the desired view from the list.2. Go to the "Dependencies" section and click the "Add" button.3. It is necessary to fill in the fields: "Dependent Entity", "Title", "Key Field", "Virtualization", "ref \ _key".- In the "Dependent Entity" field, it is necessary to select the view that needs to be made dependent from the drop-down list.- In the field "Key field" enter the key field from the dependent object.- The "daw" symbol must be indicated in the "Virtualization" field.In the field "ref-key" enter the connecting field of the base object.`` `{= html} <! -! [View dependency settings on the view] (https://abris.site/docs/img/dependence_view_from_view_1.png) ->
  1. Click "Create."

`` `{= html}

> Before creating a dependency, you must definitely check for the presence of> primary key in the views.Extending Entities -------------------- There are situations when entities require fields that cannot be specified with an exact value, since they are constantly changing.These fields include age, elapsed time, and other fields where the interval is calculated, whether it is a time interval, distance, etc. Such fields are inconvenient to indicate in entities.To do this, they are expanded with additional fields.1. In order to expand the entity, go to the "Tables" section and select "Add" under the table.2. It is necessary to fill in the fields "Schema", "Table", "Title", "Primary Key", "Type", "Description", "Complementary Entity".- The “Scheme” field contains the name of the schema to which the view will belong.- The "Table" field contains the name of the entity in the system.- In the "Primary key" field, specify the field that will be the primary key for this entity (usually it coincides with the primary key of the entity from which the new entity will be created).- The "Title" field contains the title that will be displayed to the user.- The "Type" field is a drop-down list.When creating an entity, select "View" from the list.- The Description field contains an SQL query for receiving data (you must specify an expression for calculating an additional field).- The "Complementary Entity" field contains an entity that must be supplemented with the fields of the created object.`` `= {html} <! -! [Entity extension options] (https://abris.site/docs/img/expansion_entity_1.png) ->
  1. Click "Save."

  2. Next, go to the "Entities" section and select the desired entity.Then go to the "Projections" subsection, select the desired one and go to "Properties. In the additional columns created, be sure to specify the" daw "symbol in the" Visibility \ "field. If necessary, you can change other fields.

  3. Click "Save."

`` `{= html}

If everything is done correctly, then after updating the supplemented entity, additional fields with the calculated data in them will appear in it.Configuring hidden fields -------------------------- The Abris platform allows you to hide or display fields depending on the value selected by the user.! [Table before connecting hidden fields] (https://abris.site/docs/img/set_hidden_fields_1.png) 1. In order to configure hidden fields, you must select an entity and go to "Context Actions" --- \> "Settings ... "2. In the "Advanced parameters" field, enter the following: `` {.json} {"property_visible": {"a": {"field": "b", "op": "EQ", "value": " c "}, ...}}

Instead of a, b, and c, enter:

  • instead of “a” - the name of the field (not the title), which must be displayed when the corresponding value appears in the field “b”;

  • instead of “b”, the name of the field that will serve as an indicator for field a;

  • instead of "c" - the value, when it appears in the field "b", the field "a" will be displayed.

  • If there are several fields that need to be hidden / displayed, then the lines can be listed with a comma inside the "property_visible" element.

  • Click "Save."

Таблица с подключёнными скрываемыми
полями

After the update, the changes will take effect.

Configure multiline texts

The system provides a special format for displaying and interacting with text for values ​​exceeding the volumes of comfortable perception of a text string.

  1. To go to the editing form, you need to click on the button in the upper right corner "Context Actions" ---> "Settings" ---> "Properties".

  2. Then, in the "Title" column, select the desired field and click on the selected line.

  3. After that, in the form that appears, in the "Display Type" field, select the type "plain Text without formatting".

Подключение формы для редактирования многострочных
текстов

  1. Save changes.

  2. Next, go back using the arrow in the browser and refresh the browser page.

After this change will take effect.

Форма для редактирования многострочных
текстов

After all the manipulations, the field whose properties have changed will have a different look (it will be in a large window).

Formatted text customization

In order for the entered text to be formatted in the field, it is required to change the display type for the required field.

  1. To go to the editing form, you need to click on the button in the upper right corner "Context Actions" ---> "Settings" ---> "Properties".

  2. Then, in the "Title" column, select the desired field and click on the selected line.

  3. After that, in the form that appears, in the "Display Type" field, select the type "text Formatted Text".

Подключение формы для редактирования форматированных
текстов

  1. Save changes.

  2. Next, go back using the arrow in the browser and refresh the browser page.

After this change will take effect.

Форма для редактирования форматированных
текстов

After all the manipulations, the field whose properties have changed will have a different look (it will be in a large window).

`` {= html} <! - [Setting to view detailed information on a table row`] (./ tasks / View-detail-information) ->

Creating a tree (segment \ #treedetailed) ---------------------------------------- Tree - This is a form of data display.Therefore, before creating a tree, its data must first be written in a table form.1. It is necessary to create a table of three fields: - a field containing a primary key (created automatically);- a field containing the names of the tree elements (only root ones are enough);- field containing the key of the ancestor of the element.On the last field, you need to add the foreign key to the primary key of the table being created (see p. [Create a new table] (Create% 20new% 20table) and p. [Adding a column - foreign key] (tasks / Create-new-relation-column) )2. After that you need to add several elements to the table (only the root ones are enough, but you can add the rest).3. Next, you need to make access to the table through the menu, as well as to output the table data in the form of a tree.You must click "Add" in the menu item "Menu items".4. In the form that opens, fill in the following fields: - the "Title" field contains the name of the button that will be displayed in the menu item;- the "Projection" field contains the name of the entity on the basis of which the tree will be created;- the "Display template" field contains the data output format, namely "treedetailed".5. You can also specify a value in the "Parent" field.In this field, you can specify one of the existing values ​​in the menu, then the created tree will be located as a child of the specified in this field.6. Click "Save."7. Refresh data.After updating, the created button will appear in the menu list.8. Click on the created button in the menu.A tree appears with the items added to the table earlier.9. All elements added at this stage will have one level.If some of them must be children of some of the already created ones, you can drag them to the desired element.Creating a tree (segment \ #treecrossdetailed) ------------------------------------------ --- The \ #treecrossdetailed segment contains all the features of \ #treedetailed, as well as additional features in the form of creating criteria and classes.They allow not only to make nesting of objects, but also to classify them.1. The creation of this tree begins with the creation of two tables (see p. "Creating a new table").The first table (main) consists of the following fields: - a field containing a primary key (created automatically);- a field containing the names of the tree elements (only root ones are enough);- a field containing the key of the ancestor of the element (this field should contain a foreign key looking at the primary key of the table being created (see p. [Adding a column - foreign key] (tasks / Create-new-relation-column)) .; - field, which is the foreign key of another table (added after the creation of the second table) 2. The second table (criteria table) consists of the following fields: - after, containing the primary key (created automatically); - field containing the names of the criteria; - field that is the foreign key 3. Next, you need to create foreign keys. If there is no foreign key on the third field of the main table that looks at the primary key of the same table, you need to create it. Create a foreign key from the fourth field of the main table that looks at the primary key of the criteria table. Create a foreign key from the third field of the criteria table, looking at the primary key of the main table. In the detailed form ------------------ Create buttons on the form containing detailed informationFormation about on a table row is carried out as follows: 1. A function is created for processing a button in a database in PL / pgSQL.As a parameter, a variable of the same type as the table must be used.For example, such a function displays a notification with the text "The button on the detailed form is pressed": `` {.sql} CREATE OR REPLACE FUNCTION ticket_button (tickets) RETURNS text AS $ BODY $ BEGIN RETURN 'The button is pressed on the detailed form';END $ BODY $ LANGUAGE plpgsql VOLATILE SECURITY DEFINER COST 100;

Here "tickets" is the name of the table for which the button will be created.

  1. Go to the desired table, and then click on the "Contextual Actions" button ---> "Settings" ---> "Buttons" (or go to the "Buttons" section).

  2. Click "Add."

  3. It is necessary to fill in the fields "Identifier", "Projection", "Title", "Icon", "Function", "Scheme", "For the list".

  4. In the "Identifier" field, specify the identifier for the button.

  5. The "Projection" field contains the name of the projection for which the button will be created (indicated only when creating the button through the "Buttons" section).

  6. The "Title" field contains the title of the button, as it will be displayed to users.

  7. The "Icon" field contains the name of the image, which will be displayed on the button along with the title.

  8. The "Function" field contains the name of the function to be selected.

  9. Field "Scheme" contains the name of the scheme for which the function will work.

  10. The "For list" field contains a flag for identifying the button as an element of the list (no need to specify).

Параметры кнопки для детальной
формы

  1. Click "Create" and then refresh the page.

After that, the button will appear on the form.

Созданная кнопка

In the list

The buttons on the form containing the entries are created as follows:

  1. A function is created for processing a button in a PL / pgSQL database.

An array of the same type as the primary key must be used as a parameter.

For example, such a function displays a notification with the text "The button on the list is pressed":

CREATE OR REPLACE FUNCTION ticket_button (character []) RETURNS text AS $ BODY $ BEGIN RETURN 'List button pressed';END $ BODY $ LANGUAGE plpgsql VOLATILE SECURITY DEFINER COST 100;

Here "character []" is the array of primary keys of the table for which the button will be created.

  1. Go to the desired table, and then click on the "Contextual Actions" button ---> "Settings" ---> "Buttons" (or go to the "Buttons" section).

  2. Click "Add."

  3. It is necessary to fill in the fields "Identifier", "Projection", "Title", "Icon", "Function", "Scheme", "For the list".

All fields (except the "For list" field) are similar to fields when creating a button for a detailed form.

  • The "For list" field contains a flag for identifying the button as an element of the list (check the box).

  • Click "Create" and then refresh the page.

Параметры кнопки в
списке

After that, the button will appear on the form.

Созданная кнопка

Reporting Forms Creation

Report forms are a special kind of table with additional functions for filtering.In order to create a reporting form, you must:

  1. You must select the desired entity and go to "Context Actions" ---> "Settings ...".

  2. In the "Advanced Settings" field, enter the following:

    {"report_properties": ["a", ...]}

Instead of "a", specify the field that you want to use for filtering.

If there are several such fields, they can be listed with a comma inside the "report_properties" element.

  1. Click "Save."

After updating, an element for filtering will be added for each of the listed fields according to the data type in it.

Setting Reference Fields

The information displayed in the link fields can be adjusted as follows:

  1. Go to the detailed form of any row in the table that has reference fields.

  2. To the right of the link field, click on the "Show in the context of the current form" arrow.

  3. In the form that appears, click on the "Open the form in a new window" button.

  4. Go to "Context Actions" ---> "Settings ...".

  5. Go to the "Properties" subsection.The subsection will list the table fields and their properties.

  6. You must select a field whose value will be displayed in the link field of the dependent table.In the detailed form of the selected field, change the value of the "Show in links" property to "Yes" or "No."

If all the table fields in the "Show in links" property have the value "No", then by default the values ​​of all fields are displayed in the link field.

  1. Click "Save."