RU2621628C1 - Way of the linked data storage arrangement - Google Patents

Way of the linked data storage arrangement Download PDF

Info

Publication number
RU2621628C1
RU2621628C1 RU2015148013A RU2015148013A RU2621628C1 RU 2621628 C1 RU2621628 C1 RU 2621628C1 RU 2015148013 A RU2015148013 A RU 2015148013A RU 2015148013 A RU2015148013 A RU 2015148013A RU 2621628 C1 RU2621628 C1 RU 2621628C1
Authority
RU
Russia
Prior art keywords
group
records
record
groups
identifier
Prior art date
Application number
RU2015148013A
Other languages
Russian (ru)
Inventor
Никита Сергеевич Печенкин
Михаил Викторович Ермаков
Сергей Павлович Маркин
Original Assignee
Общество с ограниченной ответственностью "Научно-технический центр РЕЛЭКС"
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Общество с ограниченной ответственностью "Научно-технический центр РЕЛЭКС" filed Critical Общество с ограниченной ответственностью "Научно-технический центр РЕЛЭКС"
Priority to RU2015148013A priority Critical patent/RU2621628C1/en
Application granted granted Critical
Publication of RU2621628C1 publication Critical patent/RU2621628C1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations
    • G06F16/24554Unary operations; Data partitioning operations
    • G06F16/24556Aggregation; Duplicate elimination

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

FIELD: information technology.
SUBSTANCE: way of the linked data storage arrangement comprises stages on which the records are united in at least one group according to the similarity; the identification code is assigned to every mentioned above group and to every record that is in this group; the link between the group ID and its location address is formed on the memory storage in such a way that the translocation of groups on the memory storage as well as among memory storages do not change the group ID value; the link between the record identifier and its location address within the group is formed on the memory storage in such a way that the record relocation on the memory storage within the group does not change the record identifier; the records of one group are saved on the memory storage in consecutive areas.
EFFECT: data base management system productivity improvement.
9 cl, 20 dwg

Description

ОБЛАСТЬ ТЕХНИКИFIELD OF TECHNOLOGY

[0001] Данное техническое решение относится к области вычислительной техники, в частности к способу хранения данных, и может быть использовано в системе управления базами данных (СУБД).[0001] This technical solution relates to the field of computer engineering, in particular to a method for storing data, and can be used in a database management system (DBMS).

УРОВЕНЬ ТЕХНИКИBACKGROUND

[0002] Из уровня техники известен патент на изобретение US 8838593 В2 «Method and system for storing, organizing and processing data in a relational database», в котором предлагается с целью повышения компрессии хранимых данных и ускорения агрегатных операций, группировать записи по значениям атрибутов, при этом способ не обязывает располагать записи одной группы в физически смежных областях запоминающего устройства (ЗУ), а вводит дополнительные логические структуры совокупным размером до 1% от всех хранимых данных.[0002] The patent for the invention US 8838593 B2 "Method and system for storing, organizing and processing data in a relational database" is known in the prior art, which proposes to group records by attribute values in order to increase compression of stored data and accelerate aggregate operations, however, the method does not oblige to place records of one group in physically adjacent areas of the storage device (memory), but introduces additional logical structures with a total size of up to 1% of all stored data.

[0003] Известно о реализации специализированных кластерных объектов в СУБД Oracle Database, используемых для совместного хранения нескольких таблиц, которые часто соединяются вместе в SQL-запросах. Кластеризованные таблицы в СУБД Oracle Database замедляют операции добавления, обновления и удаления строк, требуют создания индекса кластера.[0003] It is known that specialized cluster objects are implemented in Oracle Database, which are used to jointly store several tables that are often joined together in SQL queries. Clustered tables in Oracle Database slow down the operations of adding, updating, and deleting rows, and require the creation of a cluster index.

[0004] Наиболее близким является патент US 20090187591 A1 «Retrieving database records for aggregation without redundant database read operations», в котором с целью уменьшения операций ввода/вывода, и соответственно повышения производительности системы управления базами данных, предлагается хранить записи с идентичным значением одного из атрибутов в физически смежных областях запоминающего устройства. Описанное решение неэффективно для хранения данных в задачах, предполагающих высокую интенсивность изменения записей, поскольку модификация значения атрибута, по которому произведена группировка, приведет к обязательному перестроению групп и физическому переносу модифицированной записи в соответствующую область ЗУ. Кроме того, предлагаемый в US 20090187591 A1 способ не предполагает наличия в одной базе данных групп, сформированных по разным критериям.[0004] The closest is the patent US 20090187591 A1 "Retrieving database records for aggregation without redundant database read operations", in which, in order to reduce I / O, and thereby improve the performance of the database management system, it is proposed to store records with the identical value of one of attributes in physically adjacent areas of the storage device. The described solution is inefficient for storing data in tasks involving a high rate of change of records, since modifying the value of the attribute by which the grouping is performed will lead to the obligatory rebuilding of the groups and the physical transfer of the modified record to the corresponding memory area. In addition, the method proposed in US 20090187591 A1 does not imply the presence in the same database of groups formed according to different criteria.

СУЩНОСТЬ ИЗОБРЕТЕНИЯSUMMARY OF THE INVENTION

[0005] Данное техническое решение направлено на устранение недостатков, присущих существующим решениям хранения связанных данных.[0005] This technical solution is aimed at eliminating the disadvantages inherent in existing solutions for storing related data.

[0006] Заявляется способ организации хранения связанных данных, в котором объединяют записи в по крайней мере одну группу по схожему признаку; присваивают идентификатор каждой вышеуказанной группе и каждой записи, находящейся в данной группе; формируют связь идентификатора группы с адресом его расположения на запоминающем устройстве таким образом, что перемещение группы на запоминающем устройстве, а также между запоминающими устройствами не изменяет значение идентификатора группы; формируют связь идентификатора записи с адресом ее расположения внутри группы на запоминающем устройстве таким образом, что перемещение записи на запоминающем устройстве внутри группы не изменяет идентификатор записи; сохраняют записи одной группы на запоминающем устройстве в смежных областях.[0006] A method for organizing the storage of related data is claimed, in which records are combined into at least one group according to a similar characteristic; assign an identifier to each of the above groups and each record in this group; forming a link of the group identifier with the address of its location on the storage device in such a way that moving the group on the storage device, as well as between the storage devices, does not change the value of the group identifier; forming a connection of the record identifier with the address of its location within the group on the storage device in such a way that moving the record on the storage device within the group does not change the record identifier; store records of one group on a storage device in adjacent areas.

[0007] Техническим результатом является повышение производительности системы управления базами данных.[0007] The technical result is to increase the performance of a database management system.

[0008] Технический результат достигается путем сокращения операций ввода/вывода вследствие хранения в одной группе записей, связанных логикой предметной области и обладающих схожими признаками, а также относительной адресацией записи внутри группы, что снижает частоту изменений ссылающейся структуры данных.[0008] The technical result is achieved by reducing the input / output operations due to the storage in one group of records related by the domain logic and having similar characteristics, as well as the relative addressing of the record within the group, which reduces the frequency of changes of the referenced data structure.

[0009] В некоторых вариантах осуществления при объединении записей в группы схожим признаком является нахождение записей в реляционном отношении.[0009] In some embodiments, when combining records into groups, a similar sign is that the records are in a relational relation.

[00010] В некоторых вариантах осуществления при объединении записей в группы схожим признаком является хранение версий одних данных.[00010] In some embodiments, when combining records into groups, a similar feature is the storage of versions of the same data.

[00011] В некоторых вариантах осуществления при объединении записей в группы схожим признаком является принадлежность к одной горизонтальной секции.[00011] In some embodiments, when combining records into groups, a similar feature is that they belong to the same horizontal section.

[00012] В некоторых вариантах осуществления при объединении записей в группы схожим признаком является порядок добавления записей.[00012] In some embodiments, when combining records into groups, a similar feature is the order in which the records are added.

[00013] В некоторых вариантах осуществления при объединении записей в группы схожим признаком является идентичность одного или нескольких атрибутов.[00013] In some embodiments, when combining records into groups, a similar feature is the identity of one or more attributes.

[00014] В некоторых вариантах осуществления запоминающим устройством является ОЗУ, и/или ПЗУ, и/или магнитная память, и/или флэш-память, и/или магнитный диск, и/или оптический диск.[00014] In some embodiments, the storage device is RAM, and / or ROM, and / or magnetic memory, and / or flash memory, and / or a magnetic disk, and / or an optical disk.

[00015] В некоторых вариантах осуществления идентификатор записи и группы не являются атрибутом отношения.[00015] In some embodiments, the record identifier and the group are not a relationship attribute.

КРАТКОЕ ОПИСАНИЕ ЧЕРТЕЖЕЙBRIEF DESCRIPTION OF THE DRAWINGS

[00016] Признаки и преимущества настоящего изобретения станут очевидными из приведенного ниже подробного описания изобретения и прилагаемых чертежей, на которых:[00016] The features and advantages of the present invention will become apparent from the following detailed description of the invention and the accompanying drawings, in which:

[00017] На Фиг. 1 изображен пример отношения (120) с атрибутами (121) и несколько записей (123-125), которые хранятся в ЗУ (ПО).[00017] In FIG. Figure 1 shows an example of a relationship (120) with attributes (121) and several records (123-125) that are stored in memory (software).

[00018] На Фиг. 2 приведена схема разбиения записей по группам. Записи (222-226) разделены на две группы, каждая из которых хранится в отдельном блоке (212, 214) запоминающего устройства (ЗУ) (210). Записи 222, 224-226 объедены в группу, поскольку имеют идентичный атрибут (230). Запись 226 иллюстрирует хранение в ЗУ (210) данных неоконченной транзакции.[00018] In FIG. 2 shows a scheme for splitting records into groups. Records (222-226) are divided into two groups, each of which is stored in a separate block (212, 214) of a storage device (memory) (210). Records 222, 224-226 are grouped together because they have the identical attribute (230). Record 226 illustrates the storage of unfinished transaction data in the memory (210).

[00019] На Фиг. 3 приведена схема адресации записей и группы из ссылающейся структуры данных, где 300 - адресующая структура, 310 - адресный конвертер, 330 - слотовый конвертер, 320 - блок ЗУ, в котором хранится группы, а 324 и 322 - собственно записи.[00019] In FIG. Figure 3 shows the addressing scheme of records and groups from the referencing data structure, where 300 is the addressing structure, 310 is the address converter, 330 is the slot converter, 320 is the memory unit in which the groups are stored, and 324 and 322 are the records themselves.

[00020] На Фиг. 4 показаны результаты замеров производительности случайного чтения страниц.[00020] FIG. 4 shows the results of measurements of the performance of random reading of pages.

[00021] На Фиг. 5 показаны результаты замеров производительности последовательного чтения страниц.[00021] In FIG. 5 shows the results of measurements of sequential page read performance.

[00022] На Фиг. 6 показан пример реализации таблицы «МАТЧИ».[00022] FIG. Figure 6 shows an example implementation of the MATCHES table.

[00023] На Фиг. 7 показана схема хранения записей в страницах.[00023] In FIG. 7 shows a layout for storing records in pages.

[00024] На Фиг. 8 показана таблица «СОТРУДНИКИ».[00024] FIG. 8 shows the table “EMPLOYEES”.

[00025] На Фиг. 9 показано разбиение записей на группы «501» и «502» и их расположение на страницах ЗУ с примерным наименованием «slow».[00025] In FIG. 9 shows the breakdown of records into groups “501” and “502” and their location on the pages of the memory with the approximate name “slow”.

[00026] На Фиг. 10 показано размещение группы «501» на странице ЗУ «slow», а группы «502» на производительном ЗУ с примерным наименованием «fast».[00026] In FIG. 10 shows the placement of the “501” group on the “slow” memory page, and the “502” group on the productive memory with the approximate name “fast”.

[00027] На Фиг. 11 показано разбиение записей на следующие группы: «2016-02» и «2016-01».[00027] In FIG. 11 shows the breakdown of records into the following groups: “2016-02” and “2016-01”.

[00028] На Фиг. 12 показано содержимое страниц с данными в первоначальном состоянии (до переноса записей группы «502» на другое ЗУ).[00028] In FIG. 12 shows the contents of the data pages in the initial state (before transferring the entries of the “502” group to another memory).

[00029] На Фиг. 13 показано содержимое страниц с данными после переноса группы «502» в ЗУ «fast».[00029] In FIG. 13 shows the contents of the data pages after transferring the “502” group to the “fast” memory.

[00030] На Фиг. 14 показан примерный вариант осуществления группы c1.[00030] FIG. 14 shows an exemplary embodiment of group c1.

[00031] На Фиг. 15 показан вариант реализации адресации записей без адресного конвертера (до переноса записей);[00031] In FIG. 15 shows an embodiment of addressing records without an address converter (before transferring records);

[00032] На Фиг. 16 показан вариант реализации адресации записей без адресного конвертера (после переноса записей);[00032] In FIG. 16 shows an embodiment of addressing records without an address converter (after transferring records);

[00033] На Фиг. 17 показан вариант реализации адресации записей с использованием адресного конвертера (до переноса записей);[00033] FIG. 17 shows an embodiment of addressing records using an address converter (before transferring records);

[00034] На Фиг. 18 показан вариант реализации адресации записей с использованием адресного конвертера (после переноса записей);[00034] FIG. 18 shows an embodiment of addressing records using an address converter (after transferring records);

[00035] На Фиг. 19 показан вариант реализации, в котором в результате обновления данных запись №2 стала длиннее;[00035] In FIG. 19 shows an embodiment in which, as a result of updating the data, record No. 2 has become longer;

[00036] На Фиг. 20 показано фактическое перемещение записей внутри страниц не изменяющее номер адресующего слота.[00036] In FIG. Figure 20 shows the actual movement of records within pages without changing the addressing slot number.

ПОДРОБНОЕ ОПИСАНИЕ ИЗОБРЕТЕНИЯDETAILED DESCRIPTION OF THE INVENTION

[00037] Ниже будут описаны понятия и определения, необходимые для подробного раскрытия осуществляемого изобретения.[00037] Below will be described the concepts and definitions necessary for the detailed disclosure of the invention.

[00038] Запись - набор значений различных типов, предназначенный к хранению в ЗУ.[00038] A record is a set of values of various types intended for storage in a memory.

[00039] Группа - совокупность записей, которая рассматривается как самостоятельная единица в операциях чтения/записи, предполагающая физически объединенное хранение в ЗУ.[00039] A group is a set of records that is considered as an independent unit in read / write operations, involving physically integrated storage in a memory.

[00040] Физически смежные области - области ЗУ, предполагающие минимизацию вспомогательных операций позиционирования и адресации в операциях единовременного чтения/записи из этих областей. Зависит от реализации ЗУ, например: соседние секторы на дисковых носителях, смежные адреса виртуальной/физической памяти.[00040] Physically adjacent areas are areas of memory that involve minimizing auxiliary positioning and addressing operations in one-time read / write operations from these areas. Depends on the memory implementation, for example: neighboring sectors on disk media, adjacent virtual / physical memory addresses.

[00041] Идентификатор группы - набор данных (в частном случае - порядковый номер) однозначно идентифицирующий группу записей среди всего множества групп.[00041] A group identifier is a data set (in a particular case, a serial number) that uniquely identifies a group of records among the entire set of groups.

[00042] Идентификатор записи - набор данных (в частном случае - порядковый номер) однозначно идентифицирующий запись внутри группы (но не обязательно - среди всех записей всех групп).[00042] A record identifier is a data set (in a particular case, a serial number) that uniquely identifies a record within a group (but not necessarily among all records of all groups).

[00043] Адресный конвертер - устройство, осуществляющее вычисление адреса блока в ЗУ, в котором хранится группа записей по идентификатору группы.[00043] Address converter is a device that calculates the address of a block in a memory in which a group of records is stored by the group identifier.

[00044] Слотовый конвертер - устройство, осуществляющее вычисление адреса начала записи в блоке данных по идентификатору записи.[00044] A slot converter is a device that calculates a recording start address in a data block by a recording identifier.

[00045] Адресующая структура - структура, однозначно определяющая текущее физическое расположение записи в ЗУ, например: LBA адрес в дисковых накопителях или указатель на область виртуальной памяти.[00045] Addressing structure - a structure that uniquely determines the current physical location of a record in memory, for example: LBA address in disk drives or a pointer to a virtual memory area.

[00046] Согласно техническому решению, способ организации хранения связанных данных, включает следующие шаги:[00046] According to the technical solution, a method for organizing the storage of related data includes the following steps:

[00047] объединяют записи в по крайней мере одну группу по схожему признаку;[00047] grouping records into at least one group on a similar basis;

Признак, по которому происходит объединение записей в группы, не является ограничивающим, поскольку критерии могут быть разными и во многом определяются непосредственно данными и предметной областью. Например, данным критерием может быть нахождение записей в реляционном отношении или хранение версий одних данных или принадлежность к одной горизонтальной секции. Рассмотрим несколько вариантов осуществления технического решения, которые не являются ограничивающими.The sign by which the grouping of records occurs is not restrictive, since the criteria can be different and are largely determined directly by the data and subject area. For example, this criterion may be the location of records in a relational relation or the storage of versions of the same data or belonging to the same horizontal section. Consider several embodiments of the technical solution, which are not limiting.

Пример 1Example 1

Пусть имеется база данных, описывающая проведение чемпионата по хоккею и содержащая реляционное отношение «МАТЧИ» (Фиг. 6) с атрибутами ID, КОМАНДА ХОЗЯЕВ, КОМАНДА ГОСТЕЙ, ДАТА ПРОВЕДЕНИЯ и записями:Let there be a database describing the holding of the hockey championship and containing the “MATCHI” relational relation (Fig. 6) with the attributes ID, TEAM HOST, TEAM GUESTS, DATE AND CARRY-OUT:

Figure 00000001
Figure 00000001

При создании данного отношения был определен признак управляемой группировки: «месяц и год проведения матча», что предопределило расположение записей соответствующих матчам в феврале 2016 г. (ID=1,2) к одной группе, а записей соответствующих матчам в январе того же года (ID=3,4) - к другой. Каждой группе выделен диапазон страниц в файле данных, пусть для группы «2016-01» выделены страницы с 0 по 1, а для группы «2016-02» - с 2 по 3, тогда схема хранения записей в страницах может быть представить таким образом, как это показано на Фиг. 7.When creating this relationship, the characteristic of the controlled grouping was determined: “month and year of the match”, which predetermined the location of records corresponding to matches in February 2016 (ID = 1,2) to one group, and records corresponding to matches in January of the same year ( ID = 3,4) - to another. Each group is allocated a range of pages in the data file, let pages 0 to 1 be allocated for the group “2016-01”, and pages 2 to 3 for the group “2016-02”, then the layout for storing records in pages can be represented in this way as shown in FIG. 7.

Страницы 1 и 3 не использованы, но зарезервированы для добавления новых записей в группу, к которому они назначены.Pages 1 and 3 are not used, but reserved to add new entries to the group to which they are assigned.

Пример 2Example 2

Пусть имеется база данных сотрудников предприятия, содержащая контактную информацию персонала в отношении «СОТРУДНИКИ» (Фиг. 8) со следующими атрибутами: ID, ФАМИЛИЯ, НОМЕР КАБИНЕТА.Let there be a database of employees of the enterprise containing contact information of the personnel in relation to “EMPLOYEES” (Fig. 8) with the following attributes: ID, SURNAME, CABINET NUMBER.

При создании данного отношения был определен признак управляемой группировки: «Номер кабинета», кроме того, производится подсчет операций чтения групп, результаты которого определяют расположение группы в том или ином ЗУ. Таким образом, фактическое расположение группы с записями является адаптивным и формируется по мере эксплуатации способа автоматически.When creating this relationship, the characteristic of the controlled grouping was determined: “Cabinet number”, in addition, the reading operations of the groups are calculated, the results of which determine the location of the group in a particular memory. Thus, the actual location of the group with the records is adaptive and is formed automatically as the method is used.

Пусть в отношение добавлены следующие записи:Let the following entries be added to the relation:

Figure 00000002
Figure 00000002

На момент добавления записи, не известна статистика чтения групп. Сформированные группы с наименованиями «502» и «501» изначально размещаются в страницах 0-1 хранилища «slow» (Фиг. 9).At the time of adding the record, the statistics of reading groups is not known. The formed groups with the names “502” and “501” are initially placed in pages 0-1 of the “slow” storage (Fig. 9).

Пусть по прошествии некоторого времени эксплуатации базы данных удалось собрать следующую статистику обращений к записям:Suppose that after some time of operation of the database it was possible to collect the following statistics of accesses to records:

Figure 00000003
Figure 00000003

Figure 00000004
Figure 00000004

Поскольку группа является самостоятельной единицей в операциях чтения/записи, приведенная выше статистика означает, что к группе с условным наименованием «502» было 58 обращений (наибольшее количество из показателей по записям ID=2, ID=3), а к группе с условным наименованием «501» - 3 обращения. СУБД перемещает группу «502» на более производительное ЗУ «fast» (Фиг. 10).Since the group is an independent unit in the read / write operations, the above statistics mean that there were 58 calls to the group with the conditional name “502” (the largest number of indicators by records ID = 2, ID = 3), and to the group with the conditional name “501” - 3 hits. The DBMS moves the “502” group to the more efficient “fast” memory (Fig. 10).

[00048] присваивают идентификатор каждой вышеуказанной группе и каждой записи, находящейся в данной группе;[00048] assign an identifier to each of the above groups and each record in this group;

Каждая группа имеет уникальный (в рамках отношения) идентификатор, который необходим для адресации группы целиком, а каждая запись уникальный в рамках группы идентификатор для адресации уже непосредственно самой записи. Идентификаторы не являются атрибутом отношения.Each group has a unique (within the framework of the relationship) identifier, which is necessary for addressing the group as a whole, and each record is a unique identifier within the group for addressing the record itself. Identifiers are not an attribute of a relationship.

Таким образом, для адресующей структуры (например В-дерева) для однозначной адресации каждой записи требуется пара значений: идентификатор группы и идентификатор записи. При этом пара значений не требует изменений в адресующей структуре в следующих случаях:Thus, for an addressing structure (for example, a B-tree), for a unique addressing of each record, a pair of values is required: the group identifier and the record identifier. Moreover, a pair of values does not require changes in the addressing structure in the following cases:

- группа переносится целиком в другое ЗУ;- the group is transferred entirely to another memory;

- группа переносится целиком в другие блоки ЗУ;- the group is transferred entirely to other memory blocks;

- записи меняют порядок и положение внутри блока ЗУ, выделенного под соответствующую группу.- the records change the order and position inside the memory unit allocated to the corresponding group.

Соответствие между фактическим положением блока ЗУ и идентификатором группы определяет адресный конвертер, а положение записи внутри блока ЗУ - слотовый конвертер. Понятия адресный конвертер введены с целью упрощения описания настоящего технического решения. Специалисту в указанном уровне техники очевидно, что функции адресного и слотового конвертера может выполнять прикладной или графический процессор, не ограничиваясь.The correspondence between the actual position of the memory unit and the group identifier is determined by the address converter, and the recording position inside the memory unit is determined by the slot converter. The concepts of address converter are introduced to simplify the description of this technical solution. One skilled in the art will appreciate that the functions of an address and slot converter can be performed by an application or graphics processor, not limited to.

Пример 1Example 1

Поскольку по условиям примера, группа была создана еще на этапе создания/наполнения отношения, то приведенные записи изначально разбиты на следующие группы: «2016-02» и «2016-01» (Фиг. 11). Пусть группе «2016-01» будет присвоен идентификатор c1, а группе «2016-01» - с2. Каждая же запись будет получать идентификатор в порядке заполнения страниц: s1 - для первой добавленной записи, s2 - для второй и т.д.Since, according to the conditions of the example, the group was created at the stage of creating / filling the relationship, the above records are initially divided into the following groups: “2016-02” and “2016-01” (Fig. 11). Let the group “2016-01” be assigned the identifier c1, and the group “2016-01” - c2. Each record will receive an identifier in the order of filling the pages: s1 - for the first record added, s2 - for the second, etc.

Пример 2Example 2

Пусть порядок назначения идентификаторов будет основан на порядке добавления записей и групп в БД, тогда в первоначальном состоянии (до переноса группы) содержимое страниц с данными можно будет условно представить таким образом, как показано на Фиг. 12, а после переноса - как показано на Фиг. 13.Let the order of assigning identifiers be based on the order of adding records and groups to the database, then in the initial state (before transferring the group) the contents of the data pages can be arbitrarily presented in the manner shown in FIG. 12, and after transfer, as shown in FIG. 13.

В приведенной иллюстрации (Фиг. 13) представлен допустимый сценарий поведения: записи из групп c1 и с2 имеют сквозную нумерацию s1-s4, поскольку это не нарушает условие уникальности идентификаторов в рамках каждой группы.The above illustration (Fig. 13) shows an acceptable behavior scenario: records from groups c1 and c2 have end-to-end numbering s1-s4, since this does not violate the condition of uniqueness of identifiers within each group.

[00049] формируют связь идентификатора группы с адресом его расположения на запоминающем устройстве таким образом, что перемещение группы на запоминающем устройстве, а также между запоминающими устройствами не изменяет значение идентификатора группы;[00049] form a link of the group identifier with the address of its location on the storage device so that moving the group on the storage device, as well as between storage devices does not change the value of the group identifier;

В примерном варианте осуществления функции адресного конвертера выполняет процессор.In an exemplary embodiment, the processor performs the functions of the address converter.

Пример 1Example 1

Адресный конвертер получает на вход идентификатор группы и возвращает номер страницы с данными (допустим, что ЗУ в данном примере общее для всех групп):The address converter receives a group identifier at the input and returns the data page number (let's say that the memory in this example is common for all groups):

Figure 00000005
Figure 00000005

Пример 2.Example 2

Адресный конвертер получает на вход идентификатор группы и возвращает хранилище и номера страниц с данными.The address converter receives a group identifier at the input and returns the storage and page numbers with data.

Figure 00000006
Figure 00000006

Figure 00000007
Figure 00000007

Следует отметить, что пара идентификаторов записи (например c2:s2 - группа «502», запись №2) не меняется для адресующей структуры (например В-дерева) при переносе группы целиком, о чем упоминалось выше.It should be noted that a pair of record identifiers (for example c2: s2 - group “502”, record No. 2) does not change for the addressing structure (for example, B-tree) when transferring the whole group, as mentioned above.

[00050] формируют связь идентификатора записи с адресом ее расположения внутри группы на запоминающем устройстве таким образом, что перемещение записи на запоминающем устройстве внутри группы не изменяет идентификатор записи;[00050] linking the record identifier with the address of its location within the group on the storage device so that moving the record on the storage device within the group does not change the record identifier;

В примерном варианте осуществления функции слотового конвертера могут выполняться с использованием процессора.In an exemplary embodiment, the functions of the slot converter may be performed using a processor.

Пример 1.Example 1

Рассмотрим группу c1 (Фиг. 14).Consider the group c1 (Fig. 14).

Figure 00000008
Figure 00000008

Пример 2Example 2

Рассмотрим группу c1 (Фиг. 12).Consider the group c1 (Fig. 12).

Figure 00000009
Figure 00000009

После перемещения группы (Фиг. 13) для группы c1:After moving the group (Fig. 13) for group c1:

Figure 00000010
Figure 00000010

Figure 00000011
Figure 00000011

Отсюда следует, что пара идентификаторов записи (например c1:s4 - группа «501», запись №4) не меняется для адресующей структуры (например В-дерева) при переносе группы, о чем упоминалось выше.It follows that a pair of record identifiers (for example c1: s4 - group “501”, record No. 4) does not change for the addressing structure (for example, B-tree) when transferring the group, as mentioned above.

[00051] Записи могут быть подвержены изменению в ходе эксплуатации БД, причиной этому могут быть:[00051] Records may be subject to change during the operation of the database, the reason for this may be:

- модификация записи, после которой она уже не отвечает прежнему критерию группировки и должна быть перенесена в другую группу.- modification of the record, after which it no longer meets the previous criteria for grouping and should be transferred to another group.

- расширение/усечение размера группы. В группе может закончиться свободное место для добавления новых записей или же свободного места было выделено слишком много и хранилище используется неэффективно. В таких случаях для оптимизации группы (а следовательно и записи в него входящие) могут перемещаться внутри хранилища.- expansion / truncation of group size. The group may run out of free space to add new records or the free space has been allocated too much and the storage is used inefficiently. In such cases, to optimize the group (and therefore the entries in it) can be moved inside the repository.

[00052] Группы могут быть подвержены изменению в ходе эксплуатации БД, причиной этому могут быть:[00052] Groups may be subject to change during the operation of the database, the reason for this may be:

- изменение критериев группировки, в результате которой все группы должны быть перестроены.- change of grouping criteria, as a result of which all groups should be rebuilt.

- перенос групп с одного хранилища в другое. Такая необходимость может возникнуть в случае переноса части отношения в архив или в случае размещения части записей на более производительный носитель, в случаях шардирования и т.п.- Transfer groups from one store to another. Such a need may arise if part of the relationship is transferred to the archive or if some of the records are placed on a more efficient medium, in cases of sharding, etc.

[00053] сохраняют записи одной группы на запоминающем устройстве в смежных областях.[00053] store records of one group on a storage device in adjacent areas.

Под смежными областями понимаются области ЗУ, предполагающие минимизацию вспомогательных операций позиционирования и адресации в операциях единовременного чтения/записи из этих областей. В обоих рассмотренных примерах в качестве ЗУ предполагается HDD, в таком случае под смежными областями предполагается секторы с соседними адресами, что позволяет в полной мере использовать реализованное в современных накопителях упреждающее чтение секторов. Замеры производительности прототипов (Фиг. 3-4) иллюстрируют это.Adjacent areas are areas of memory that involve minimizing auxiliary positioning and addressing operations in one-time read / write operations from these areas. In both examples considered, a HDD is assumed as a storage device, in this case sectors with adjacent addresses are assumed under adjacent areas, which allows full use of the forward reading of sectors implemented in modern drives. Measurements of the performance of the prototypes (Fig. 3-4) illustrate this.

[00054] Запоминающее устройство может быть реализовано в виде любого типа энергозависимого запоминающего устройства, энергонезависимого запоминающего устройства или их комбинации, например, статического оперативного запоминающего устройства (СОЗУ), электрически-стираемого программируемого постоянного запоминающего устройства (ЭСППЗУ), стираемого программируемого постоянного запоминающего устройства (СППЗУ), программируемого постоянного запоминающего устройства (ППЗУ), постоянного запоминающего устройства (ПЗУ), магнитной памяти, флэш-памяти, магнитного диска или оптического диска.[00054] The storage device may be implemented in the form of any type of non-volatile memory, non-volatile memory, or a combination thereof, for example, static random access memory (RAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory ( EPROM), programmable read-only memory (ROM), read-only memory (ROM), magnetic memory, fl br memory, a magnetic disk or optical disk.

[00055] Указанный технический результат достигается следующим образом. При оценке количества операций, порождаемых перемещением группы записей целиком, для случаев с адресным конвертером (или процессором) и без него получается: пусть группа из трех записей перемещается из страницы N в страницу М. Пусть на все три записи ссылается индекс таблицы, а на запись #2 еще и структура в ОЗУ (например, транзакция ожидает снятие блокировки). Без использования адресного конвертера все адресующие структуры ссылаются на запись, используя пару значений - номер страницы, номер слота на странице. Подобные решения используется в некоторых современных реляционных СУБД: Oracle, Firebierd. В рассмотренном примере на Фиг. 15 и Фиг. 16 даже в случае простого переноса страницы с тремя записями необходимо обновить три листа в В-дереве индекса и одну структуру в ОЗУ (изменения выделены красным на Фигуре 16). В случае использования адресного конвертера, как показано на Фиг. 17 и Фиг. 18, обновляются только служебные данные самого адресного конвертера, т.е. однократно в одном месте (изменения выделены красным на Фигуре 18). Рассмотрим слотовый конвертер на Фиг. 19. Пусть в результате обновления данных запись №2 стала длиннее, тогда она перемещается в хвост страницы. Как видно на Фиг. 20, фактическое перемещение записей внутри страниц не изменило номер адресующего слота, запись поменяла свое положение на странице, но не поменяла свой идентификатор.[00055] The specified technical result is achieved as follows. When estimating the number of operations generated by moving a group of records as a whole, for cases with an address converter (or processor) and without it it turns out: let a group of three records move from page N to page M. Let the table index refer to all three records, and the record # 2 is also a structure in RAM (for example, a transaction is waiting to unlock). Without using an address converter, all addressing structures refer to a record using a pair of values - page number, slot number on the page. Similar solutions are used in some modern relational DBMSs: Oracle, Firebierd. In the example considered in FIG. 15 and FIG. 16, even in the case of a simple transfer of a page with three entries, it is necessary to update three sheets in the index B-tree and one structure in RAM (the changes are highlighted in red in Figure 16). In the case of using an address converter, as shown in FIG. 17 and FIG. 18, only the service data of the address converter itself is updated, i.e. once in one place (changes are highlighted in red in Figure 18). Consider the slot converter in FIG. 19. Let the record No. 2 become longer as a result of data updating, then it moves to the tail of the page. As seen in FIG. 20, the actual movement of the records inside the pages did not change the addressing slot number, the record changed its position on the page, but did not change its identifier.

[00056] Таким образом, совместное использование адресного и слотового конвертеров позволяют без изменения адресующих структур перемещать записи внутри хранилища. За свободу перемещения группы целиком отвечает адресный конвертер, за свободу перемещения одиночных записей в группе - слотовый конвертер. Эффект совместного использования адресного и слотового конвертеров используются для хранения записей одной группы «рядом» друг с другом в физически смежных областях.[00056] Thus, the joint use of the address and slot converters allows, without changing the addressing structures, to move records within the repository. The address converter is entirely responsible for the freedom of movement of the group, and the slot converter is responsible for the freedom of movement of single entries in the group. The effect of sharing address and slot converters is used to store records of one group “next to each other” in physically adjacent areas.

[00057] Рассмотрим, чем заявленное техническое решение отличается от хеш-функций. Согласно Д. Кнуту (Искусство программирования, том 3, § 6.4) хеширование или метод рассеянной памяти предполагает наличие функции h(K)такой, что[00057] Consider how the claimed technical solution differs from hash functions. According to D. Knut (The Art of Programming, Volume 3, § 6.4), hashing or the method of open memory suggests the existence of a function h (K) such that

Figure 00000012
Figure 00000012

Figure 00000013
Figure 00000013

[00058] Кроме того, хорошая хеш-функция по Р. Флойду должна удовлетворять требованию минимизации коллизий. Т.е. в общем случае[00058] In addition, a good hash function according to R. Floyd must satisfy the requirement of minimizing collisions. Those. in general

Figure 00000014
Figure 00000014

Адресный конвертер a() и слотовый конвертер s() не удовлетворяют условию (1). Пусть есть две идентичные записиAddress converter a () and slot converter s () do not satisfy condition (1). Let there be two identical entries

Figure 00000015
Figure 00000015

Согласно предлагаемому решению они относятся к одной группе (С-идентификатор группы):According to the proposed solution, they belong to one group (C-identifier of the group):

Figure 00000016
Figure 00000016

Внутри группы идентификатор слота I должен быть уникальным, т.е.Within the group, the identifier of slot I must be unique, i.e.

Figure 00000017
Figure 00000017

Figure 00000018
Figure 00000018

Поскольку для однозначной идентификации записи используется пара значений {CR,IR}, то, как видим, (7) нарушает требование (1). Т.е. а() и s() не обладают необходимыми свойствами хеш-функций.Since a pair of values {C R , I R } is used to uniquely identify the record, then, as we see, (7) violates requirement (1). Those. a () and s () do not have the necessary properties of hash functions.

Более того, (7) будет всегда верна только в том случае, когда вся группа расположена в одном блоке ЗУ, в противном случае в некоторых ситуациях одинаковые записи хоть и расположены в одной группе, но в разных блоках, и тогда первое равенство в (7) не будет для таких случаев.Moreover, (7) will always be true only if the whole group is located in one memory block, otherwise, in some situations, the same records are located in the same group, but in different blocks, and then the first equality in (7 ) will not be for such cases.

Помимо этого, как указано в описании групп - они могут перемещаться внутри хранилища в ходе работы СУБД (например, для расширения, если группа переполнена), т.е. в разные моменты времени tn и tm выражение (5) может быть неверно даже для одной и той же записи:In addition, as indicated in the description of the groups, they can be moved inside the repository during the operation of the DBMS (for example, to expand if the group is full), i.e. at different times t n and t m expression (5) may be incorrect even for the same record:

Figure 00000019
Figure 00000019

В свою очередь, в группе возможно освобождение слотов (например после удаления записи) и тогда слот может быть снова использован позднее для другой записи группы, т.е.:In turn, it is possible to free slots in a group (for example, after deleting an entry) and then the slot can be used again later for another group entry, i.e.:

Figure 00000020
Figure 00000020

В заключении следует отметить, что назначение пары {С,I} для новых записей не является функцией в классическом ее понимании, а осуществляется механизмом, реализующим алгоритм принятия решения, который учитывает:In conclusion, it should be noted that the appointment of the pair {C, I} for new records is not a function in its classical sense, but is carried out by a mechanism that implements a decision-making algorithm that takes into account:

- признак группировки;- sign of grouping;

- наличие конфликтующих признаков группировки (запись попадает более чем под одно условие) и правила их разрешения (например, использовать приоритеты групп в случае конфликтов для определения целевой группы);- the presence of conflicting signs of a grouping (a record falls under more than one condition) and the rules for resolving them (for example, use group priorities in case of conflict to determine the target group);

- заполненность блоков в которых размещены группы (не допускать полного заполнения блоков для возможности расширения записей);- fullness of the blocks in which the groups are located (not to allow the complete filling of blocks for the possibility of expanding records);

- заполненность слотов внутри блока (повторно переиспользовать освобождающиеся идентификаторы);- fullness of slots inside the block (reuse reused identifiers);

- состояние СУБД (производить перестроение групп в фоновом режиме во время простоя, например).- DBMS state (rebuild groups in the background during idle time, for example).

[00059] Настоящее подробное описание составлено с приведением различных, не имеющих ограничительного и исчерпывающего характера вариантов осуществления. В то же время, специалистам, очевидно, что различные замены, модификации или сочетания любых раскрытых здесь вариантов осуществления (в том числе частично) могут быть воспроизведены в пределах объема настоящего технического решения. Таким образом, подразумевается и понимается, что настоящее описание включает дополнительные варианты осуществления, суть которых не изложена здесь в явно выраженной форме. Такие варианты осуществления могут быть получены путем, например, сочетания, модификации или преобразования каких-либо действий, компонентов, элементов, свойств, аспектов, характеристик, ограничений и пр., относящихся к приведенным здесь и не имеющим ограничительного характера вариантам осуществления.[00059] The present detailed description is made up of various non-restrictive and exhaustive embodiments. At the same time, it will be apparent to those skilled in the art that various replacements, modifications, or combinations of any of the embodiments disclosed herein (including in part) can be reproduced within the scope of this technical solution. Thus, it is understood and understood that the present description includes additional embodiments, the essence of which is not set forth here in an explicit form. Such embodiments may be obtained, for example, by combining, modifying, or transforming any actions, components, elements, properties, aspects, characteristics, limitations, etc., related to the embodiments presented herein and not being restrictive.

ПРИМЕРЫ РЕАЛИЗАЦИИEXAMPLES OF IMPLEMENTATION

[00060] В рамках осуществления заявляемого технического решения был реализован вариант осуществления способа и проведены замеры скорости чтения страниц как в группах, так и без них. Производилось сравнение работы механизмов СУБД ЛИНТЕР v5.9-6.0 без описываемых в данном техническом решении существенных признаков с прототипом СУБД ЛИНТЕР AT, где организация хранения связанных данных была реализована.[00060] In the framework of the implementation of the proposed technical solution, an embodiment of the method was implemented and measurements were taken of the speed of reading pages in groups as well as without them. The operation of the DBMS LINTER v5.9-6.0 mechanisms without the essential features described in this technical solution was compared with the DBMS LINTER AT prototype, where the organization of storing related data was implemented.

[00061] Применялась следующая методика измерений:[00061] The following measurement procedure was used:

1. В качестве эталонных значений скорости чтения/записи на тестовом аппаратном обеспечении приняты следующие значения, полученные утилитой hdparm:1. The following values received by the hdparm utility are accepted as reference values of the read / write speed on the test hardware:

1. чтение из страничного кеша ОС: 13225 Мб/с;1. reading from the OS page cache: 13225 Mb / s;

2. чтение с диска (последовательное): 147 Мб/с.2. disk reading (sequential): 147 Mb / s.

2. Испытания проводились сериями по 5 запусков с одинаковыми настройками, крайние значения отслеживаемых параметров отбрасывались, а от оставшихся трех бралось среднее арифметическое.2. The tests were carried out in series of 5 starts with the same settings, the extreme values of the monitored parameters were discarded, and the arithmetic mean was taken from the remaining three.

3. Каждая серия испытаний проводилась на двух типах формата: ЛИНТЕР v5.9-6.0 (без группировок связанных данных) и ЛИНТЕР AT (с группировками связанных данных) для следующих значений параметра n (количество генерируемых записей): 50 тыс., 100 тыс., 200 тыс., 250 тыс., 500 тыс., 1 млн, 5 млн, 10 млн, 15 млн.3. Each test series was carried out on two types of format: Linter v5.9-6.0 (without groupings of related data) and Linter AT (with groups of related data) for the following values of parameter n (number of generated records): 50 thousand, 100 thousand , 200 thousand, 250 thousand, 500 thousand, 1 million, 5 million, 10 million, 15 million

4. Значение параметра m (размер выборки) во всех испытаниях принималось равным 50% от значения n.4. The value of the parameter m (sample size) in all tests was taken equal to 50% of the value of n.

5. Отслеживаемые значения: время генерации файлов, размер файлов, скорость чтения записей в последовательном и случайном режимах.5. Tracked values: file generation time, file size, speed of reading records in sequential and random modes.

6. В каждом из испытаний размер тела генерируемой записи в байтах являлся случайным числом из диапазона [8…256], которое округлялось до наименьшего четного. С учетом заголовков среднее значение полного размера записи во всех замерах лежало в диапазоне [133…135] байт.6. In each of the tests, the body size of the generated record in bytes was a random number from the range [8 ... 256], which was rounded to the smallest even. Taking into account the headers, the average value of the total recording size in all measurements lay in the range [133 ... 135] bytes.

7. Инструментарий тестирования не использовал и не эмулировал кэш СУБД.7. The testing tools did not use or emulate the DBMS cache.

8. Во всех случаях записи размещались на страницах максимально плотно - место под расширение записей или для подселения новых не резервировалось.8. In all cases, the entries were placed on the pages as densely as possible - no place was reserved for expanding entries or for sharing new ones.

9. Во всех случаях признаком группировки являлся порядок добавления записей.9. In all cases, a sign of grouping was the procedure for adding entries.

[00062] Результаты сравнения ключевых показателей измерения для разных форматов приведены на Фиг. 4 и на Фиг. 5.[00062] The results of comparing key measurement indicators for different formats are shown in FIG. 4 and in FIG. 5.

[00063] Реализация способа осуществляется изменением способа адресации записи из адресующей структуры (см. Фиг. 3) и введением адресного и слотового конвертеров.[00063] The implementation of the method is carried out by changing the addressing method of the record from the addressing structure (see Fig. 3) and the introduction of address and slot converters.

[00064] В частном случае функции адресного и слотового конвертера могут выполняться с использованием прикладного или графического процессора.[00064] In the particular case, the functions of the address and slot converter can be performed using an application or graphics processor.

[00065] Адресующая структура (300) содержит идентификатор группы CR(307) и идентификатор записи IR(305) внутри группы, которые (идентификаторы) являются логическими и никак не соотносятся с фактическим расположением записи в ЗУ. Пара значений (CR, IR) однозначно идентифицирует единичную запись R. Для получения адреса PR фактического расположения записи R в ЗУ используется адресный конвертер (310), производящий вычисление адреса Pc блока (320) в ЗУ, в котором (блоке) расположена группа CR. Непосредственно в самом блоке (320) хранятся соответствия (326, 327) идентификаторов записи и расположением тела записи (322) относительно начала блока. Вычисление этого смещения производит слотовый конвертер (330), производящий вычисление адреса начала записи относительно начала блока, ее содержащей. При такой адресации перемещение и модификация записи внутри одной группы, равно как и перемещение всей группы целиком на новый блок ЗУ, не приведет к изменению значений пары (CR,IR).[00065] The addressing structure (300) contains the group identifier C R (307) and the record identifier I R (305) within the group, which (identifiers) are logical and do not correlate with the actual location of the record in the memory. A pair of values (C R , I R ) uniquely identifies a single entry R. To obtain the address P R of the actual location of the R record in the memory, an address converter (310) is used to calculate the address P c of block (320) in the memory in which (block) the group C R is located . Directly in the block (320) itself, the correspondence (326, 327) of the record identifiers and the location of the record body (322) relative to the beginning of the block are stored. The calculation of this offset produces a slot converter (330), which calculates the address of the beginning of the recording relative to the beginning of the block containing it. With this addressing, moving and modifying a record within one group, as well as moving the entire group to a new memory unit, will not lead to a change in the values of the pair (C R , I R ).

[00066] Рассмотрим пример реализации слотового конвертера в Линтер-AT.[00066] Consider an example implementation of a slot converter in Linter-AT.

[00067] Данные необходимые для определения адреса начала записи в блоке данных по идентификатору записи хранятся непосредственно в странице данных, приведем ее формат.[00067] The data necessary to determine the start address of the record in the data block by the record identifier is stored directly in the data page, here is its format.

[00068] Страница данных содержит упакованные записи в соответствии с NSM (N-агу Storage Model) моделью хранения. Помимо заголовка в конце страницы расположен каталог слотов (slot directory) страницы, представляющий массив слотов. Размер каждой записи в слоте - 4 байта, при этом:[00068] The data page contains packed records in accordance with the NSM (N-agu Storage Model) storage model. In addition to the header at the end of the page is a directory of slots (slot directory) of the page, which represents an array of slots. The size of each entry in the slot is 4 bytes, while:

[00069] 8-19 биты - SLOT_LENGTH размер (фактический) записи;[00069] 8-19 bits - SLOT_LENGTH size (actual) of the record;

[00070] 20-31 биты - OFFSET смещение на запись относительно начала страницы;[00070] 20-31 bits - OFFSET offset to write relative to the beginning of the page;

[00071] 7 бит - COLLECTION_FLAG признак того, что слот содержит коллекцию записей;[00071] 7 bits - COLLECTION_FLAG sign that the slot contains a collection of records;

[00072] 3-6 бит - зарезервировано;[00072] 3-6 bits - reserved;

[00073] Типы слота могут быть следующими:[00073] The types of slots may be as follows:

[00074] SLOT_FREE (0×0) слот свободен, OFFSET и SLOT LENGTH могут быть отличными от 0 и указывать свободную область;[00074] SLOT_FREE (0 × 0) slot is free, OFFSET and SLOT LENGTH can be other than 0 and indicate a free area;

[00075] SLOT_ADDRESS - слот содержит только адрес записи, но не саму запись;[00075] SLOT_ADDRESS - the slot contains only the address of the record, but not the record itself;

[00076] SLOT_NORMAL - запись соответствует группе и полностью расположена в слоте;[00076] SLOT_NORMAL - the record corresponds to the group and is completely located in the slot;

[00077] SLOT_BIG - слот описывает «большую» запись;[00077] SLOT_BIG - the slot describes a "large" record;

[00078] SLOT_RELOCATED - запись содержит перенесенную;[00078] SLOT_RELOCATED - the record contains the transferred;

[00079] SLOT_FRAGMENT - слот содержит фрагмент «длинной» записи без заголовков;[00079] SLOT_FRAGMENT - the slot contains a fragment of a "long" record without titles;

[00080] SLOT_DELETED - слот помечен к удалению.[00080] SLOT_DELETED - the slot is marked for deletion.

[00081] Записи размещаются последовательно от заголовка к концу страницы, слоты - от конца страницы - к заголовку. Пространство между концом последней записи и первым слотом доступно для размещения новых записей. При удалении записи значение соответствующего слота выставляется в 0×00. При перемещении тела записи внутри одной страницы номер слота не меняется. Порядок записей на странице может не совпадать с порядком ссылающихся слотов.[00081] Entries are placed sequentially from the heading to the end of the page, slots from the end of the page to the heading. The space between the end of the last record and the first slot is available for placing new records. When deleting a record, the value of the corresponding slot is set to 0 × 00. When moving the recording body within one page, the slot number does not change. The order of entries on the page may not coincide with the order of referring slots.

[00082] Рассмотрим пример реализации адресного конвертера в Линтер-AT.[00082] Consider an example implementation of an address converter in Linter-AT.

[00083] Данные, необходимые для вычисление адреса блока в ЗУ, в котором хранится группа записей по идентификатору группы, хранятся в файле данных в страницах данных адресного конвертера. Страницы адресного конвертера содержат упорядоченные записи, определяющие расположение групп в страницах файлов БД и фактическую занятость слотов в соответствующей группе. Формат записи не зависит от модели изоляции.[00083] The data necessary for calculating the address of the block in the memory in which the group of records is stored by the group identifier is stored in the data file in the data pages of the address converter. The pages of the address converter contain ordered records that determine the location of groups in the database file pages and the actual occupancy of the slots in the corresponding group. The recording format is independent of the isolation model.

[00084] FREE_SPACE_FACTOR содержит оценочное значение свободного пространства для размещения новой записи, где 0×0 - свободна, 0×FF - занята полностью;[00084] FREE_SPACE_FACTOR contains the estimated value of free space to accommodate a new record, where 0 × 0 - free, 0 × FF - fully occupied;

[00085] PAGENUM - номер страницы в файле данных, в котором расположена группа;[00085] PAGENUM - page number in the data file in which the group is located;

[00086] FNUM - номер файла;[00086] FNUM - file number;

[00087] BITMAP - битовая маска слотов в группе (необходима чтобы знать заранее о занятости слота).[00087] BITMAP is a bitmask of slots in a group (necessary to know in advance about slot occupancy).

[00088] Рассмотрим отличие идентификаторов группы и записи заявляемого технического решения от физического ROWID в СУБД Oracle.[00088] Consider the difference between the group identifiers and the entries of the claimed technical solution from the physical ROWID in Oracle DBMS.

[00089] Физические ROWID (https://docs.oracle.com/cd/B28359_01/server.111/b28318/datatype.htm#i6732) описывают текущее положение строки. Например[00089] The physical ROWIDs (https://docs.oracle.com/cd/B28359_01/server.111/b28318/datatype.htm#i6732) describe the current position of the row. for example

Figure 00000021
Figure 00000021

[00095] Любое перемещение записи в другой блок приведет к изменению физического ROWID.[00095] Any movement of a record to another block will result in a change in the physical ROWID.

[00096] В заявляемом техническом решении идентификаторы логические и группа может «переехать» вообще на другое ЗУ без изменения идентификатора.[00096] In the claimed technical solution, the identifiers are logical and the group can "move" to another memory altogether without changing the identifier.

[00097] Рассмотрим отличие идентификаторов группы и записи от логического ROWID в СУБД Oracle.[00097] Consider the difference between group and record identifiers from logical ROWID in Oracle DBMS.

[00098] Во-первых, логические ROWID получаются на основе значения индексируемого атрибута, и его изменение приведет к изменению логического ROWID. В заявляемом техническом решении нет такой привязки идентификатора к значению записи или ее атрибута.[00098] First, the logical ROWIDs are obtained based on the value of the indexed attribute, and changing it will cause the logical ROWID to change. In the claimed technical solution there is no such binding of the identifier to the value of the record or its attribute.

[00099] В-вторых, логический ROWID содержит неидентифицируемую составляющую, т.н. physical guess, которая фактически указывает последнее местоположение записи, но она может устареть при перемещении записи и операция чтения может потерпеть неудачу, в таком случае производится поиск записи.[00099] Secondly, the logical ROWID contains an unidentifiable component, the so-called physical guess, which actually indicates the last location of the record, but it may become outdated when moving the record and the read operation may fail, in which case the record is searched.

[000100] В-третьих, ROWID никак не отображает «близость» расположения записей в ЗУ. В заявляемом решении идентификаторы двух записей одной группы будут иметь одинаковое значение CR, на основании сразу можно определить то, что эти записи гарантированно хранятся «рядом» на ЗУ.[000100] Third, the ROWID does not display the “proximity” of the location of the records in the memory in any way. In the claimed solution, the identifiers of two records of the same group will have the same value C R , on the basis of which it can immediately be determined that these records are guaranteed to be stored “next to” on the memory.

Claims (14)

1. Способ организации хранения связанных данных, в котором:1. A method of organizing the storage of related data, in which: - объединяют записи в по крайней мере одну группу по схожему признаку;- combine records in at least one group on a similar basis; - присваивают идентификатор каждой вышеуказанной группе и каждой записи, находящейся в данной группе;- Assign an identifier to each of the above groups and each record in this group; - формируют связь идентификатора группы с адресом его расположения на запоминающем устройстве таким образом, что перемещение группы на запоминающем устройстве, а также между запоминающими устройствами не изменяет значение идентификатора группы;- form a relationship between the group identifier and the address of its location on the storage device in such a way that moving the group on the storage device, as well as between the storage devices, does not change the value of the group identifier; - формируют связь идентификатора записи с адресом ее расположения внутри группы на запоминающем устройстве таким образом, что перемещение записи на запоминающем устройстве внутри группы не изменяет идентификатор записи;- linking the record identifier with the address of its location within the group on the storage device so that moving the record on the storage device within the group does not change the record identifier; - сохраняют записи одной группы на запоминающем устройстве в смежных областях.- save the records of one group on the storage device in adjacent areas. 2. Способ по п. 1, в котором при объединении записей в группы схожим признаком является нахождение записей в реляционном отношении.2. The method according to p. 1, in which when combining records in groups, a similar sign is the finding of records in a relational relation. 3. Способ по п. 1, в котором при объединении записей в группы схожим признаком является хранение версий одних данных.3. The method according to claim 1, in which when combining records into groups, a similar feature is the storage of versions of the same data. 4. Способ по п. 1, в котором при объединении записей в группы схожим признаком является принадлежность к одной горизонтальной секции.4. The method according to p. 1, in which when combining records in groups, a similar sign is the belonging to one horizontal section. 5. Способ по п. 1, в котором при объединении записей в группы схожим признаком является порядок добавления записей.5. The method according to claim 1, in which when combining records into groups, a similar feature is the order of adding records. 6. Способ по п. 1, в котором при объединении записей в группы схожим признаком является идентичность одного или нескольких атрибутов.6. The method according to claim 1, in which when combining records into groups, a similar feature is the identity of one or more attributes. 7. Способ по п. 1, в котором запоминающим устройством является ОЗУ, и/или ПЗУ, и/или магнитная память, и/или флэш-память, и/или магнитный диск, и/или оптический диск.7. The method of claim 1, wherein the storage device is RAM, and / or ROM, and / or magnetic memory, and / or flash memory, and / or a magnetic disk, and / or an optical disk. 8. Способ по п. 1, в котором идентификатор записи и группы не являются атрибутом отношения.8. The method according to claim 1, in which the identifier of the record and group are not an attribute of the relationship. 9. Способ по п. 1, в котором перемещают записи в случае в случае модификации записей или изменения критериев группировки.9. The method according to claim 1, in which the records are moved in the case of a modification of the records or changes in the grouping criteria.
RU2015148013A 2016-03-29 2016-03-29 Way of the linked data storage arrangement RU2621628C1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
RU2015148013A RU2621628C1 (en) 2016-03-29 2016-03-29 Way of the linked data storage arrangement

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
RU2015148013A RU2621628C1 (en) 2016-03-29 2016-03-29 Way of the linked data storage arrangement

Publications (1)

Publication Number Publication Date
RU2621628C1 true RU2621628C1 (en) 2017-06-06

Family

ID=59032094

Family Applications (1)

Application Number Title Priority Date Filing Date
RU2015148013A RU2621628C1 (en) 2016-03-29 2016-03-29 Way of the linked data storage arrangement

Country Status (1)

Country Link
RU (1) RU2621628C1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2707675C1 (en) * 2019-06-17 2019-11-28 Общество с ограниченной ответственностью "УМИКОН" Method of organizing data storage on network nodes with data transmission between network nodes with predictable loading of network nodes for real-time systems

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090187591A1 (en) * 2008-01-22 2009-07-23 Alcatel Lucent Retrieving database records for aggregation without redundant database read operations
US20110295895A1 (en) * 2003-06-13 2011-12-01 Cbs Interactive Inc. Catalog taxonomy for storing product information and system and method using same
US8838593B2 (en) * 2006-09-18 2014-09-16 Infobright Inc. Method and system for storing, organizing and processing data in a relational database
US9003162B2 (en) * 2012-06-20 2015-04-07 Microsoft Technology Licensing, Llc Structuring storage based on latch-free B-trees
RU2575987C2 (en) * 2010-02-11 2016-02-27 Телефонактиеболагет Л М Эрикссон (Пабл) Data management in directory database

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110295895A1 (en) * 2003-06-13 2011-12-01 Cbs Interactive Inc. Catalog taxonomy for storing product information and system and method using same
US8838593B2 (en) * 2006-09-18 2014-09-16 Infobright Inc. Method and system for storing, organizing and processing data in a relational database
US20090187591A1 (en) * 2008-01-22 2009-07-23 Alcatel Lucent Retrieving database records for aggregation without redundant database read operations
RU2575987C2 (en) * 2010-02-11 2016-02-27 Телефонактиеболагет Л М Эрикссон (Пабл) Data management in directory database
US9003162B2 (en) * 2012-06-20 2015-04-07 Microsoft Technology Licensing, Llc Structuring storage based on latch-free B-trees

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2707675C1 (en) * 2019-06-17 2019-11-28 Общество с ограниченной ответственностью "УМИКОН" Method of organizing data storage on network nodes with data transmission between network nodes with predictable loading of network nodes for real-time systems

Similar Documents

Publication Publication Date Title
US6668263B1 (en) Method and system for efficiently searching for free space in a table of a relational database having a clustering index
US9149054B2 (en) Prefix-based leaf node storage for database system
KR101467589B1 (en) Dynamic fragment mapping
KR100856245B1 (en) File system device and method for saving and seeking file thereof
CN105320775A (en) Data access method and apparatus
CN107766374B (en) Optimization method and system for storage and reading of massive small files
CN108021717B (en) Method for implementing lightweight embedded file system
CN111459885B (en) Data processing method and device, computer equipment and storage medium
CN113407550A (en) Data storage and query method, device and database system
US8682872B2 (en) Index page split avoidance with mass insert processing
CN111143285A (en) Small file storage file system and small file processing method
JP4199888B2 (en) Database management method
Amur et al. Design of a write-optimized data store
CN114610708A (en) Vector data processing method and device, electronic equipment and storage medium
AU2018345147B2 (en) Database processing device, group map file production method, and recording medium
US20160012075A1 (en) Computer system and data management method
RU2621628C1 (en) Way of the linked data storage arrangement
CN108804571B (en) Data storage method, device and equipment
US20210209087A1 (en) Reorganization of Databases by Sectioning
US7565217B2 (en) Traversal of empty regions in a searchable data structure
US20050071366A1 (en) Method, apparatus and computer program for retrieving data
US20150324408A1 (en) Hybrid storage method and apparatus
WO2023274197A1 (en) Operation request processing method and related device
CN113779955B (en) Method, device and storage medium for generating difference script
CN114356232B (en) Data reading and writing method and device

Legal Events

Date Code Title Description
PD4A Correction of name of patent owner