Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
If required, you You can extend the SimpleOne data model by adding new columns to existing tables. When doing so it is important to remember Remember that the updated data model will apply is applied to all child tables, since the as new columns will be inherited. When it is unwantedare also inherited from parent tables. If you need to extend the data model without creating columns, use the following data model extension methods:
- InheritanceRecord extended model
- Adding REM attributes
Inheritance
Inheritance (also called table extension) allows to create is the extension of tables with child data structures which that inherit all the attributes of the parent structure and supplement them with have their own attributes. This Inheritance allows you to avoid big number of many duplicate columns and build an a hierarchical structure of objects in which where each following child element is a narrower subset. The inheritance can be multi-level, i.e. a ; a child table can be a parent table for other tables.
When using inheritance keep in mind that many engines have an option to can also work within child entities as well. . For example, business rules, user roles, client scripts, and others.
The inherited values and logic related to the table can be overridden (ссфлку добавить) on the level of a child table for child tables.
The inheritance mechanism works well when there is a small number of correctly with a few child tables that have a lot of many common attributes between them. However, as As the number of child pages increases and the number of common attributes decreases, managing it becomes difficult to manage such a data structure becomes difficultmodel.
A Disadvantages of a data model with an extended, a complex inheritance structure has the following drawbacks:
- Too much storage space is required to store the records.
- The scripts Scripts are executed slower.
- It becomes difficult to configure features related to a table , such as data import, form view configuration, etcand others.
An example of Примером такой таблицы является каталог запросов: он состоит из родительской таблицы для каталога и записей в таблице для каждого шаблона запроса с определенными атрибутами.
Расширенная модель записи
При использовании расширенной модели записи (REM) не создаются новые таблицы и колонки, а создаются атрибуты данных, выборочно применяемые к определенным записям таблицы. При применении расширенной модели к той или иной записи, для нее создается вспомогательный набор записей, в котором хранится информация по значениям конкретных атрибутов. Таким образом у записи есть атрибуты, полученные от таблицы и, дополнительно, атрибуты, получаемые из расширенной модели (REM-атрибуты).
of complex data model is the template service catalog. It consists of a parent table for the catalog and table records for each request template with specific attributes.
Record extended model
When using the record extended model (REM), no new tables or columns are created. Instead, new data attributes are created that are selectively applied to specific table records. When an extended model is applied to a record, an additional set of records is created for the model that stores information about the values of specific attributes. Thus the record has attributes received from the table and attributes received from the record extended model (REM attributes).
The REM attributes allow you to avoid the limitations of the inheritance mechanism by adding record attributes that are not inherited by child tables. Without the REM attributes, it is necessary to create many child tables, each adding one column. Besides, the REM attributes can be collected into REM models that categorize objects from the same table. An example of such a use case is the REM service catalogБлагодаря REM-атрибутам можно обойти ограничения механизма наследования, добавляя к записям атрибуты, которые не будут наследоваться дочерними таблицами. Без REM атрибутов пришлось бы создавать большое количество уровней наследования, на которых родитель отличается от потомка наличием всего одного поля. Кроме того, REM-атрибуты могут объединяться в REM-модели, позволяющие осуществлять категоризацию объектов из одной таблицы. Примером такого использования является каталог услуг.
Table of Contents |
---|