Data change detection method, data change detection system, program, and recording medium
The data change detection system in relational databases captures and merges pre-change and post-change data to identify altered relationships, addressing the challenge of real-time data change detection in complex relational databases.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- LINE PLUS
- Filing Date
- 2025-07-16
- Publication Date
- 2026-05-18
AI Technical Summary
Existing methods struggle to detect data changes in relational databases in real-time due to the complex association relationships inherent in such databases, making it difficult to grasp and analyze log files effectively.
A data change detection system and method that captures pre-change and post-change data based on linkage relationships in a relational database, merging these to identify changes in relationships between records across different tables, including one-to-one, one-to-many, and many-to-many relationships.
Enables real-time detection of data changes in relational databases by identifying altered relationships between records, providing comprehensive information on affected data through user interfaces.
Smart Images

Figure 2026081110000001_ABST
Abstract
Description
Technical Field
[0001] The following description relates to a method and system for real-time detection of data change events in a relational database.
Background Art
[0002] A relational database is a database that uses unique identifiers to connect two or more databases or tables, and means a data structure configured such that each item and its attributes are connected to all other items and their attributes. Such a relational database has data that is multiply connected and can be said to be one of the powerful and flexible databases that connect to each different field. Usually, a relational query gives specific conditions to one or more fields to search for records that meet those conditions.
[0003] In order to detect changes in data stored in such a relational database, it is necessary to periodically perform a database inspection and analyze the log file. However, such a log file has a structure that makes it difficult to grasp the association relationship, which is an inherent characteristic of the relational database, so it has been difficult to detect changes related to the association relationship of data.
Prior Art Documents
Patent Documents
[0004]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0005] Provided are a method and system for real-time detection of data change events in a relational database. [Means for solving the problem]
[0006] A data change detection method for a data change detection system implemented by at least one computer device is provided, comprising the steps of: receiving a data change request for data in a relational database using at least one processor included in at least one computer device; capturing pre-change data based on the linkage relationships in the data corresponding to the data change request using at least one processor; changing the data corresponding to the data change request using at least one processor; capturing post-change data based on the linkage relationships in the changed data using at least one processor; and merging the captured pre-change data and the captured post-change data using at least one processor to extract data where the linkage relationships have changed.
[0007] According to one embodiment, the cooperative relationship is characterized by including a relationship established between records belonging to different tables in a relational database.
[0008] According to other embodiments, the relationship is characterized by being set up by selecting one of the following: a one-to-one relationship set up between one record in a source table of a relational database and one record in a destination table; a one-to-many relationship set up between multiple records in a source table and one record in a destination table; and a many-to-many relationship set up between multiple records in a source table and multiple records in a destination table.
[0009] Furthermore, according to another embodiment, one-to-one relationships and one-to-many relationships are set by storing in the source table the identifiers of the records in the destination table that have a relationship with the records in the source table.
[0010] Furthermore, according to another embodiment, the many-to-many relationship is established through a connection table that includes information about the relationship between identifiers of multiple records in the source table and identifiers of multiple records in the destination table.
[0011] Furthermore, according to another embodiment, the step of capturing pre-change data is characterized by capturing pre-change data that includes the identifiers of a first record containing the data corresponding to the data change request and a second record with which a linkage relationship was established before the data change, and the identifier of a third record whose linkage relationship with the record was terminated by the change of the first record.
[0012] Furthermore, according to another embodiment, the step of capturing the modified data is characterized by capturing the modified data which includes the identifier of the first record and the identifier of the fourth record which has a relationship with the first record established after the data has been modified.
[0013] Furthermore, according to another embodiment, the merging step is characterized by merging the identifier of the second record and the identifier of the fourth record to extract the identifier of the record in which a change in the relationship has occurred.
[0014] Furthermore, according to other embodiments, the data change detection method further includes the step of providing, by at least one processor, the identifier of the third record, the identifier of the first record, and the extracted identifier as information about the finally identified change.
[0015] To cause a computer device to execute the aforementioned data change detection method, a program stored on a computer-readable recording medium is provided. Furthermore, a program for causing a computer device to execute the aforementioned data change detection method is also provided.
[0016] A data change detection system is provided, which is implemented by at least one computer device, and includes at least one processor configured to execute instructions readable by at least one computer device, wherein the at least one processor receives a data change request for data in a relational database, captures pre-change data based on the linkage relationships in the data corresponding to the data change request, captures post-change data based on the linkage relationships in the changed data, and merges the captured pre-change data and the captured post-change data to extract the data whose linkage relationships have changed. [Effects of the Invention]
[0017] We can provide a method and system for detecting data changes in relational databases in real time. [Brief explanation of the drawing]
[0018] [Figure 1] This diagram shows an example of a network environment in one embodiment of the present invention. [Figure 2] This is a block diagram showing an example of a computer device in one embodiment of the present invention. [Figure 3] This figure shows an example of an environment in which a data change detection system operates in one embodiment of the present invention. [Figure 4] This diagram shows examples of projects, collections, and fields in one embodiment of the present invention. [Figure 5] This diagram shows an example of an item in one embodiment of the present invention. [Figure 6] This diagram illustrates an example of a relationship in one embodiment of the present invention. [Figure 7] This diagram shows an example of a one-to-one relationship database schema in one embodiment of the present invention. [Figure 8] This diagram shows an example of a one-to-many relationship database schema in one embodiment of the present invention. [Figure 9] This is a diagram showing an example of a database schema for a many-to-many relationship in one embodiment of the present invention. [Figure 10] This is a diagram showing an example of an application schema in one embodiment of the present invention. [Figure 11] This is a diagram showing an example of a collection for a one-to-one relationship in one embodiment of the present invention. [Figure 12] This is a diagram showing an example of a collection for a one-to-many relationship in one embodiment of the present invention. [Figure 13] This is a diagram showing an example of a collection for a many-to-many relationship in one embodiment of the present invention. [Figure 14] This is a flowchart showing an example of a data change detection method in one embodiment of the present invention. [Figure 15] This is a diagram for explaining an example of a process for detecting data changes in one embodiment of the present invention. [Figure 16] This is a diagram for explaining another example of a process for detecting data changes in one embodiment of the present invention. [Figure 17] This is a diagram showing an example of a user interface for providing information regarding data changes in one embodiment of the present invention. [Figure 18] This is a diagram showing an example of a user interface for providing information regarding data changes in one embodiment of the present invention. [Figure 19] This is a diagram showing an example of a user interface for providing information regarding data changes in one embodiment of the present invention. [Figure 20] This is a diagram showing an example of a user interface for providing information regarding data changes in one embodiment of the present invention. [Figure 21] This is a diagram showing an example of changes between records for a one-to-many relationship in one embodiment of the present invention. [Figure 22] This is a diagram showing an example of changes between records for a many-to-many relationship in one embodiment of the present invention.
Mode for Carrying Out the Invention
[0019] The embodiments will be described below with reference to the attached drawings.
[0020] A data change detection system according to an embodiment of the present invention can be implemented by at least one computer device. In this case, a computer program according to one embodiment of the present invention may be installed and executed on the computer device, and the computer device may execute a data change detection method according to an embodiment of the present invention in accordance with the control of the executed computer program. The above-described computer program may be combined with the computer device and recorded on a computer-readable recording medium in order to have the computer execute the data change detection method.
[0021] Figure 1 is a diagram showing an example of a network environment in one embodiment of the present invention. The network environment in Figure 1 shows an example that includes a plurality of electronic devices 110, 120, 130, 140, a plurality of servers 150, 160, and a network 170. Figure 1 is merely an example for the purpose of explaining the invention, and the number of electronic devices and servers is not limited to that shown in Figure 1. Furthermore, the network environment in Figure 1 is merely an example for the purpose of explaining an environment applicable to this embodiment, and the environment applicable to this embodiment is not limited to the network environment in Figure 1.
[0022] The multiple electronic devices 110, 120, 130, and 140 may be fixed terminals or mobile terminals implemented by computer devices. Examples of the multiple electronic devices 110, 120, 130, and 140 include smartphones, mobile phones, navigation systems, PCs (personal computers), notebook PCs, digital broadcasting terminals, PDAs (Personal Digital Assistants), PMPs (Portable Multimedia Players), and tablets. As an example, Figure 1 shows a smartphone as an example of electronic device 110, but in embodiments of the present invention, electronic device 110 may mean one of a variety of physical computer devices that can communicate with other electronic devices 120, 130, 140 and / or servers 150, 160 via the network 170 using substantially wireless or wired communication methods.
[0023] The communication method is not limited, and may include not only communication methods that utilize communication networks that can be included in network 170 (for example, mobile communication networks, wired internet, wireless internet, broadcasting networks), but also short-range wireless communication between devices. For example, network 170 may include one or more arbitrary networks such as PAN (personal area network), LAN (local area network), CAN (campus area network), MAN (metropolitan area network), WAN (wide area network), BBN (broadband network), and the Internet. Furthermore, network 170 may include, but is not limited to, one or more network topologies, including bus networks, star networks, ring networks, mesh networks, star-bus networks, tree or hierarchical networks.
[0024] Servers 150 and 160 can each be implemented by one or more computer devices that communicate with multiple electronic devices 110, 120, 130, and 140 via a network 170 to provide instructions, code, files, content, services, etc. For example, server 150 may be a system that provides services to multiple electronic devices 110, 120, 130, and 140 connected via a network 170.
[0025] Figure 2 is a block diagram showing an example of a computer device in one embodiment of the present invention. Each of the aforementioned electronic devices 110, 120, 130, and 140, as well as the servers 150 and 160, can be realized by the computer device 200 shown in Figure 2.
[0026] Such a computer device 200 may include a memory 210, a processor 220, a communication interface 230, and an input / output interface 240, as shown in Figure 2. The memory 210 is a computer-readable recording medium and may include RAM (random access memory), ROM (read-only memory), and a permanent mass storage device such as a disk drive. Here, the permanent mass storage device such as ROM and a disk drive may be included in the computer device 200 as a separate permanent storage device distinct from the memory 210. The memory 210 may also store an operating system and at least one program code. Such software components may be loaded into the memory 210 from a computer-readable recording medium separate from the memory 210. Such a separate computer-readable recording medium may include a floppy disk drive, disk, tape, DVD / CD-ROM drive, memory card, and other computer-readable recording media. In other embodiments, the software components may be loaded into the memory 210 through a communication interface 230, which is not a computer-readable recording medium. For example, software components can be loaded into the memory 210 of the computer device 200 based on a computer program installed by a file received via the network 170.
[0027] The processor 220 may be configured to process computer program instructions by performing basic arithmetic, logic, and input / output operations. Instructions may be provided to the processor 220 by memory 210 or a communication interface 230. For example, the processor 220 may be configured to execute instructions received according to program code recorded in a recording device such as memory 210.
[0028] The communication interface 230 may provide a function for the computer device 200 to communicate with other devices (for example, the recording device described above) via the network 170. For example, requests, instructions, data, files, etc., generated by the processor 220 of the computer device 200 according to program code recorded in a recording device such as memory 210 may be transmitted to other devices via the network 170 under the control of the communication interface 230. Conversely, signals, instructions, data, files, etc., from other devices may be received by the computer device 200 via the network 170 through the communication interface 230 of the computer device 200. Signals, instructions, data, etc., received via the communication interface 230 may be transmitted to the processor 220 or memory 210, and files, etc., may be recorded on recording media (the persistent recording device described above) that the computer device 200 may further include.
[0029] The input / output interface 240 may be a means for interface with an input / output device 250. For example, an input device may include a microphone, keyboard, or mouse, and an output device may include a display or speaker. In another example, the input / output interface 240 may be a means for interface with a device that integrates input and output functions into one, such as a touchscreen. At least one of the input / output devices 250 may consist of a computer device 200 and one other device. For example, this can be implemented in a form where a touchscreen, microphone, speaker, etc., are included in the computer device 200, as in a smartphone.
[0030] In other embodiments, the computer device 200 may include fewer or more components than those shown in Figure 2. However, it is not necessary to explicitly show most of the conventional components in the figure. For example, the computer device 200 may be implemented to include at least some of the input / output devices 250 described above, and may further include other components such as transceivers and databases.
[0031] Figure 3 shows an example of an environment in which a data change detection system operates in one embodiment of the present invention. The data change detection system 300 according to this embodiment may be implemented by at least one computer device (for example, computer device 200) and can detect changes by modifying data stored in the relational database 320 in accordance with a data change request from a user 310. The user 310 may substantially correspond to a user terminal that the user 310 uses to access the data change detection system 300. Such a user terminal may also be implemented by computer device 200 and can request data changes and receive information about data changes through a user interface provided by the data change detection system 300 via a network (for example, network 170). In this case, the data change detection system 300 may not only detect changes in the record being changed, but also detect and record changes in records that have a linked relationship with the record being changed. Through such recording, it becomes possible to confirm information about what kind of changes affected the record being changed, even through records that have a linked relationship with the record being changed.
[0032] Table 1 below provides an explanation of the terminology used in the data structure in one embodiment of the present invention.
[0033] [Table 1] TIFF2026081110000003.tif76170
[0034] In this case, the data change detection system 300 may convert the database schema to an application schema and provide services to the user. Figures 4 to 6 below show examples of providing a user interface according to the application schema.
[0035] Figure 4 is a diagram illustrating an example of a project, collection, and field in one embodiment of the present invention. Figure 4 shows an example of a user interface for a user to create and manage collections for a project and fields for a collection. Here, the first dashed box 410 shows information for a specific project, and the second dashed box 420 shows an example of a list of collections generated for that project. Furthermore, the third dashed box 430 shows an example of a list of fields generated for an arbitrary collection "articles".
[0036] Figure 5 is a diagram showing an example of an item in one embodiment of the present invention. Figure 5 shows an example of a user interface for a user to generate and manage items. The dashed box 510 in Figure 5 shows an example of a list of items generated for the table "articles". Each item may contain data for each field generated for the table "articles" as described with reference to Figure 4.
[0037] Figure 6 is a diagram illustrating an example of a relationship in one embodiment of the present invention. Figure 6 shows an example of a user interface for a user to set up relationships between collections. Figure 6 shows an example of setting up a one-to-many relationship between the field "authors" in the collection "articles" and the field "articles" in the collection "authors". Such relationships will be explained below.
[0038] On the other hand, Table 2 below shows an example of a database schema for a basic record storage structure, and Table 3 shows an example of a basic record storage structure.
[0039] [Table 2]
[0040] [Table 3]
[0041] As an example, Table 3 shows that the table "table_123" has two records identified as id "1" and id "2". In this case, the record identified as id "1" has "A" stored in field "field_a" and "AAA" stored in field "field_b", while the record identified as id "2" has "B" stored in field "field_a" and "BBB" stored in field "field_b".
[0042] Figure 7 shows an example of a one-to-one relationship database schema in one embodiment of the present invention. Figure 7 shows an example where a one-to-one relationship is established between a source table "table_1" and a destination table "table_2". In this case, the source table "table_1" may store relationship record information such as "table_2.field_c". The relationship record information may include the "id" of the destination table "table_2". Foreign keys (FKs) can be used to define relationships between tables in a relational database. For example, a foreign key can mean a key in one table that can identify a row (record) in another table.
[0043] As an example, Tables 4 and 5 show examples of source and destination tables with one-to-one relationships established.
[0044] [Table 4]
[0045] [Table 5]
[0046] Tables 4 and 5 show examples where a one-to-one relationship is established between a record (id=1) in the source table "table_1" and a record (id=1) in the destination table "table_2", and between a record (id=2) in the source table "table_1" and a record (id=2) in the destination table "table_2". Information indicating such one-to-one relationships may be stored in the source table "table_1". Figure 8 is a diagram showing an example of a database schema with one-to-many relationships in one embodiment of the present invention. Figure 8 shows an example where a one-to-many relationship is established between the source table "table_1" and the destination table "table_2". In this case, relationship record information such as "table_2.field_d" may be stored in the source table "table_1". Relationship record information may include the "id" of the destination table "table_2".
[0047] As an example, Table 6 shows an example of a source table with a one-to-many relationship. An example of a destination table is shown in Table 5.
[0048] [Table 6]
[0049] Tables 4 and 5 show examples where a one-to-many relationship is established between records (id=1, id=2) in the source table "table_1" and a record (id=1) in the destination table "table_2", and a one-to-one relationship is established between a record (id=3) in the source table "table_1" and a record (id=2) in the destination table "table_2". Information indicating such one-to-many and one-to-one relationships may be stored in the source table "table_1". Figure 9 shows an example of a database schema for a many-to-many relationship in one embodiment of the present invention. Individual connection tables may be used to establish many-to-many relationships. Figure 9 shows an example where a one-to-many relationship is established between the source table "table_1" and the connection table, and a one-to-many relationship is established between the connection table and the destination table "table_2".
[0050] As an example, Tables 7 and 8 show examples of source and connection tables, respectively. In this case, we assume the destination table has four records (id=1, id=2, id=3, id=4).
[0051] [Table 7]
[0052] [Table 8]
[0053] The connection table in Table 8 may contain information about the relationship between records in the source table and records in the destination table. For example, looking at the records in the connection table (id=1, id=2, id=3, id=4) in Table 8, we can see that there is a one-to-many relationship between the record in the source table (id=1) and the records in the destination table (id=1, id=2, id=3), and a one-to-many relationship between the records in the source table (id=1, id=2) and the record in the destination table (id=3). In short, a many-to-many relationship is established between the records in the source table and the records in the destination table. On the other hand, when the data change detection system 300 converts the database schema to an application schema, the application schema must be configured so that relationship data can be collected within the application. For example, in the process of converting the database schema to an application schema in order to connect to relationship data, the data change detection system 300 may repeat the following processes (1) and (2) for each field of the table.
[0054] (1) The data change detection system 300 may determine whether the field in question is of a relation type and define a relation collection schema for the field that is of a relation type.
[0055] (2) You may fetch relational collections.
[0056] Figure 10 shows an example of an application schema in one embodiment of the present invention. Each collection contains fields below it, and if they are relationship fields, it may contain collection information that is linked to them through a relationship structure. This allows the application to access the relationship collections and collect data when data changes occur.
[0057] Table 9 below shows an example of an application schema. An application can structure its collections as shown in Table 9.
[0058] [Table 9]
[0059] For example, the data change detection system 300 may access the relationship collection through the structure of the collection configured in the application and read the values of the records (items). The relationship collection schema may be configured differently depending on the relationship type, and the application schema can be completed by combining the results. Examples of configuring the relationship collection schema according to the relationship type will be explained with reference to Figures 11-13.
[0060] Figure 11 shows an example of a one-to-one relationship collection in one embodiment of the present invention. In this case, the field schema and relationship schema for the collection in Figure 11 may be shown in Tables 10 and 11 below, respectively.
[0061] [Table 10]
[0062] [Table 11]
[0063] Figure 12 shows an example of a one-to-many relationship collection in one embodiment of the present invention. In this case, the field schema and relationship schema for the collection in Figure 12 may be shown in Tables 12 and 13 below, respectively.
[0064] [Table 12]
[0065] [Table 13]
[0066] Figure 13 shows an example of a many-to-many relationship collection in one embodiment of the present invention. In this case, the field schema and relationship schema for the collection in Figure 13 may be shown in Tables 14 and 15 below, respectively.
[0067] [Table 14] TIFF2026081110000017.tif69163
[0068] [Table 15]
[0069] Figure 14 is a flowchart showing an example of a data change detection method according to one embodiment of the present invention. The data change detection method according to this embodiment can be executed by a data change detection system 300. The data change detection system 300 can be implemented by at least one computer device 200. In this case, the processor 220 of the computer device 200 can be implemented to execute control instructions from the operating system code contained in the memory 210 and the code of at least one computer program. Here, the processor 220 operates according to the control instructions provided by the code recorded in the computer device 200 and can control the computer device 200 so that the data change detection system 300 implemented by the computer device 200 executes steps 1410 to 1460 included in the method of Figure 14. In step 1410, the data change detection system 300 can receive a data change request for data in a relational database. As described above, the data in a relational database may be divided into projects, tables, and records, and a record may contain field-specific values for a table. In this case, a linkage relationship may be established between records belonging to different tables. The relationship may be one of the following: a one-to-one relationship between one record in a relational database source table and one record in a destination table; a one-to-many relationship between multiple records in a source table and one record in a destination table; or a many-to-many relationship between multiple records in a source table and multiple records in a destination table. In this case, the one-to-one and one-to-many relationships may be set by storing the identifiers of the records in the destination table with which the source table records have a relationship in the source table. The many-to-many relationship may be set through a connection table that contains information about the relationship between the identifiers of multiple records in the source table and the identifiers of multiple records in the destination table.
[0070] In step 1420, the data change detection system 300 may capture pre-change data based on the linkage relationships to the data corresponding to the data change request. For example, the data change detection system 300 may capture pre-change data that includes the identifiers of the first record containing the data corresponding to the data change request and the second record with which a linkage relationship was established before the data change, and the identifier of the third record whose linkage relationship with the first record was terminated by the change to the first record. The second record may contain two or more records due to the linkage relationship. The third record may be a record whose own linkage relationship data was lost due to the change to the first record.
[0071] In step 1430, the data change detection system 300 may change the data corresponding to the data change request. In accordance with such data changes, the relationships between the corresponding records may also be changed. The relationships between the records before the change can be determined from the identifier of the second record described above.
[0072] In step 1440, the data change detection system 300 may capture the modified data based on the relationships with the modified data. For example, the data change detection system 300 may capture the modified data including the identifier of the first record and the identifier of the fourth record with which a relationship has been established after the data change. The fourth record may contain two or more records due to the relationship. The fourth record may also have at least one record overlapping with the second record. Here, the records that overlap and are included in the fourth record and the second record may represent records whose relationship has not been changed.
[0073] In step 1450, the data change detection system 300 may merge the captured pre-change data and the captured post-change data to extract the data whose linkage relationship has changed. For example, the data change detection system 300 may merge the identifier of the second record and the identifier of the fourth record to extract the identifier of the record in which the linkage relationship has changed. As described above, records that overlap between the fourth record and the second record may represent records whose linkage relationship has not changed, and records whose linkage relationship has not changed may be excluded from collection.
[0074] In step 1460, the data change detection system 300 may provide information about the finally identified changes. For example, the data change detection system 300 may provide the identifier of the third record, the identifier of the first record, and the extracted identifier as information about the finally identified changes.
[0075] Figure 15 illustrates an example of a process for detecting data changes in one embodiment of the present invention. Figure 15 shows an example of the situation before a change, where the record "table_1.id=1" in table "table_1" has a relationship with the records "table_2.id=1" and "table_2.id=2" in table "table_2", and the record "table_1.id=2" in table "table_1" has a relationship with the records "table_2.id=3" and "table_2.id=4" in table "table_2". Figure 15 also shows an example of the situation after a data change request, where the record "table_1.id=1" in table "table_1" has a relationship with the records "table_2.id=2" and "table_2.id=3" in table "table_2", and the record "table_1.id=2" in table "table_1" has a relationship with the record "table_2.id=4" in table "table_2".
[0076] In other words, this example shows that, in response to a data change request, the link between the record "table_1.id=1" in table "table_1" and the record "table_2.id=1" in table "table_2" is broken, and instead, a link is established with the record "table_2.id=3" in table "table_2".
[0077] In this case, the data change detection system 300 may first capture the data before the change. As described above, the data change detection system 300 may obtain the identifiers of the second record (table_2.id=1 and table_2.id=2) with which the first record (table_1.id=1) had a linkage relationship established before the data change, and may obtain the identifier of the third record (table_1.id=2) whose linkage relationship with the record (table_2.id=3) was terminated by the change in the first record (table_1.id=1). In this case, the captured data before the change may include {table_2.id=1, table_2.id=2, table_1.id=2}.
[0078] Subsequently, the data change detection system 300 may change the data as shown in Figure 15 and capture the changed data. The data change detection system 300 may obtain the identifier of the first record (table_1.id=1) and the identifiers of the fourth record (table_2.id=2 and table_2.id=3) that have a linkage relationship with the first record after the data change. In this case, the captured changed data may include {table_1.id=1, table_2.id=2, table_2.id=3}.
[0079] Furthermore, the data change detection system 300 may merge the identifiers of the second record (table_2.id=1, table_2.id=2) and the identifiers of the fourth record (table_2.id=2, table_2.id=3) to extract the identifiers of the records in which a change has occurred in the linkage relationship (table_2.id=1, table_2.id=3). The identifier of the record in which no change has occurred in the linkage relationship (table_2.id=2) may be excluded.
[0080] In this case, the data change detection system 300 may provide the identifier of the third record (table_1.id=2), the identifier of the first record (table_1.id=1), and the extracted identifiers (table_2.id=1, table_2.id=3) as information about the finally identified changes. In this case, the information about the changes may include {table_1.id=2, table_1.id=1, table_2.id=1, table_2.id=1, table_2.id=3}.
[0081] After the changes, since the first record (table_1.id=1) has a link relationship with the fourth record (table_2.id=2, table_2.id=3), it becomes possible to understand through the information about the changes that the link relationship between the first record (table_1.id=1) and the record (table_2.id=1.id=1) has been broken, a new link relationship has been established between the first record (table_1.id=1) and the record (table_2.id=3), and the link relationship between the third record (table_1.id=2) and the record (table_2.id=3) has been broken.
[0082] Figure 16 illustrates another example of a process for detecting data changes in one embodiment of the present invention. Figure 16 shows an example of a change in the relationship between records in tables related to employees and employee information. More specifically, Figure 16 shows an example of the situation before the change, where the record "employee.id=1" in the table "employee" has a relationship with the record "employee_info.id=1" in the table "employee_info", and the record "employee.id=2" in the table "employee_info" has a relationship with the record "employee_info.id=2" in the table "employee_info". Figure 16 also shows an example of the situation after the change, in accordance with the data change request, where the record "employee.id=1" in the table "employee" has been changed to have a relationship with the record "employee_info.id=2" in the table "employee_info".
[0083] In other words, this example shows how, in response to a data change request, the link between the record "employee..id=1" in the table "employee_info" and the record "employee_info.id=1" in the table "employee_info" is broken, and instead, a link is established with the record "employee_info.id=2" in the table "employee_info".
[0084] In this case, the data change detection system 300 may first capture the data before the change. As described above, the data change detection system 300 may obtain the identifier (employee_info.id=1) of the second record with which a linkage relationship was established before the data change with the first record (employee.id=1), and may obtain the identifier (employee.id=2) of the third record whose linkage relationship with the record (employee_info.id=2) was terminated by the change in the first record (employee.id=1). In this case, the captured data before the change may include {employee_info.id=1, employee.id=2}.
[0085] Subsequently, the data change detection system 300 may change the data as shown in Figure 16 and capture the changed data. The data change detection system 300 may obtain the identifier of the first record (employee.id=1) and the identifier of the fourth record (employee_info.id=2) which has a linked relationship with the first record after the data change. In this case, the captured changed data may include {employee.id=1, employee_info.id=2}.
[0086] Furthermore, the data change detection system 300 can merge the identifier of the second record (employee_info.id=1) and the identifier of the fourth record (employee_info.id=2) to extract the identifiers of the records in which a change has occurred in the linkage relationship (employee_info.id=1, employee_info.id=2).
[0087] In this case, the data change detection system 300 may provide the identifier of the third record (employee.id=2), the identifier of the first record (employee.id=1), and the extracted identifiers (employee_info.id=1, employee_info.id=2) as information about the finally identified changes. In this case, the information about the changes may include {employee.id=2, employee.id=1, employee_info.id=1, employee_info.id=2}.
[0088] After the change, since the first record (employee.id=1) has a linked relationship with the fourth record (employee_info.id=2), the information about the changes will allow us to understand that the linked relationship between the first record (employee.id=1) and the record (employee_info.id=1) has been removed, a new linked relationship has been established between the first record (employee.id=1) and the record (employee_info.id=1), and the linked relationship between the third record (employee.id=2) and the record (employee_info.id=2) has been removed.
[0089] Figures 17-20 show examples of user interfaces that provide information about data changes in one embodiment of the present invention.
[0090] Figure 17 shows an example of providing a list of changes to the collection item "mployee_info" (id=1). The first dashed box 1710 shows the changes explained with reference to Figure 16, and the second dashed box 1720 shows that, due to the data changes, the item "employee_info.id=1" no longer has any linked items with which it has a relationship.
[0091] Figure 18 shows an example of a user interface that allows users to view items in different versions due to data changes, through an item breakdown for item (id=1) in the collection "employee_info". In this case, a function may be provided to guide users to the items that affected the changes in the relevant data.
[0092] Figure 19 shows an example of providing a list of changes to the item (id=2) in the collection "employee_info". The first dashed box 1910 shows the changes explained with reference to Figure 12, and the second dashed box 1920 shows information about the item (employee.id=1) with which the item (id=2) in the collection "employee_info" has a relationship due to the data changes.
[0093] Figure 20 shows an example of a user interface that allows users to view items in different versions due to data changes, through the item breakdown of item (id=2) in the collection "employee_info". In this case, a function may be provided to guide users to the items that affected the changes in the relevant data.
[0094] Figure 21 is a diagram illustrating an example of a change between records with a one-to-many relationship in one embodiment of the present invention. Figure 21 shows an example of a change between records where a team and a player have a one-to-many relationship. The data change is substantially the same as the data change shown in Figure 15, so a detailed explanation is omitted.
[0095] Figure 22 is a diagram illustrating an example of a change between records in a many-to-many relationship in one embodiment of the present invention. In Figure 22, each order contains multiple products, and each product has a many-to-many relationship in which it is included in multiple orders.
[0096] The data change detection system 300 may detect a change in the linkage of record (id=1) in table "order" (product(id=1,2->1,2,3,4). Conversely, the data change detection system 300 may also detect a change in the linkage of record (id=3) in table "product" (order(id=2->1,2)) and may detect a change in the linkage of record (id=4) in table "product" (order(id=2,3->1,2,3)).
[0097] Thus, according to embodiments of the present invention, a method and system for detecting data changes in a relational database in real time can be provided.
[0098] The systems or devices described above may be realized by hardware components, or by combinations of hardware and software components. For example, the devices and components described in the embodiments may be realized using one or more general-purpose or special-purpose computers, such as processors, controllers, ALUs (arithmetic logic units), digital signal processors, microcomputers, FPGAs (field programmable gate arrays), PLUs (programmable logic units), microprocessors, or various devices capable of executing and responding to instructions. The processing unit may execute an operating system (OS) and one or more software applications running on the OS. The processing unit may also respond to the execution of software, access data, record, manipulate, process, and generate data. For convenience of understanding, it may be described as if a single processing unit is used, but those skilled in the art will understand that the processing unit may include multiple processing elements and / or multiple types of processing elements. For example, the processing unit may include multiple processors or one processor and one controller. Other processing configurations, such as parallel processors, are also possible.
[0099] Software may include computer programs, code, instructions, or a combination of one or more of these, which may configure a processing unit to operate as desired, or which may instruct the processing unit independently or collectively. Software and / or data may be implemented in any kind of machine, component, physical device, virtual equipment, computer recording medium, or device for interpretation based on a processing unit or for providing instructions or data to a processing unit. Software may be distributed across networked computer systems and may be executed even when recorded in a distributed manner. Software and data may be recorded on one or more computer-readable recording media.
[0100] The methods according to the embodiment can be implemented in the form of program instructions executable by various computer means and recorded on a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, etc., individually or in combination. The medium may continuously record computer-executable programs or may temporarily record them for execution or download. The medium may also be a variety of recording or storage means in the form of a combination of one or more hardware components, and may be a medium directly connected to a computer system or distributed on a network. Examples of media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical media such as CD-ROMs and DVDs, magneto-optical media such as floptical disks, and media configured to record program instructions such as ROMs, RAMs, and flash memories. Other examples of media include recording media and storage media managed by app stores that distribute applications, and sites and servers that supply and distribute various other software. Examples of program instructions include not only machine code such as that generated by a compiler, but also high-level language code that is executed by a computer using an interpreter or the like.
[0101] As described above, embodiments have been explained based on limited embodiments and drawings, but those skilled in the art will be able to make various modifications and variations from the above description. For example, the described technique may be performed in a different order than described, and / or the components of the described system, structure, apparatus, circuit, etc. may be combined or combined in a different manner than described, or replaced by other components or equivalents, and still achieve suitable results.
[0102] Therefore, any different embodiment falls within the scope of the appended claims, provided it is equivalent to the claims.
[0103] This application claims priority based on Patent Application No. 10-2024-0152546, filed with the Korean Intellectual Property Office on 31 October 2024, and the entire contents of said Application No. 10-2024-0152546 are incorporated into this application by reference. [Explanation of Symbols]
[0104] 110, 120, 130, 140 electronic equipment 150, 160 servers 170 Networks
Claims
1. A data change detection method for a data change detection system implemented by at least one computer device, The steps include: receiving a data change request for data in a relational database using at least one processor included in the at least one computer device; The steps include capturing pre-change data based on the relationship between the data corresponding to the data change request using at least one of the processors, The steps include: modifying the data corresponding to the data change request using at least one of the aforementioned processors; The steps include capturing the modified data based on the relationship between the modified data using at least one processor, The steps include: merging the captured pre-modification data and the captured post-modification data using at least one processor to extract data whose relationship has changed; A data change detection method, including the above.
2. The data change detection method according to claim 1, characterized in that the aforementioned relationship includes a relationship established between records belonging to different tables in the relational database.
3. The data change detection method according to claim 1, characterized in that the aforementioned relationship is set by selecting one of the following: a one-to-one relationship set between one record in the source table of the relational database and one record in the destination table; a one-to-many relationship set between multiple records in the source table and one record in the destination table; and a many-to-many relationship set between multiple records in the source table and multiple records in the destination table.
4. The data change detection method according to claim 3, characterized in that the one-to-one relationship and the one-to-many relationship are set by storing in the source table the identifier of the record in the destination table that has a relationship with the record in the source table.
5. The data change detection method according to claim 3, characterized in that the many-to-many relationship is established through a connection table that includes information about the relationship between identifiers of multiple records in the source table and identifiers of multiple records in the destination table.
6. The step of capturing the data before the change is: The data change detection method according to claim 1, characterized by capturing pre-change data including the identifier of a first record containing data corresponding to the data change request and a second record with which a linkage relationship was established before the data change, and the identifier of a third record whose linkage relationship with the record was terminated by the change of the first record.
7. The step of capturing the modified data is as follows: The data change detection method according to claim 6, characterized in that it captures modified data including the identifier of the first record and the identifier of a fourth record whose linkage relationship with the first record is established after the data has been changed.
8. The aforementioned merging step is, The data change detection method according to claim 7, characterized by merging the identifier of the second record and the identifier of the fourth record to extract the identifier of the record in which a change in the linkage relationship has occurred.
9. The step of providing the identifier of the third record, the identifier of the first record, and the extracted identifier as information about the finally identified changes using at least one processor. The data change detection method according to claim 8, further comprising:
10. A program for causing a computer device to execute the data change detection method described in any one of claims 1 to 9.
11. A computer-readable recording medium having a program recorded on it that causes a computer device to execute the data change detection method described in any one of claims 1 to 9.
12. A data change detection system implemented by at least one computer device, The system includes at least one processor configured to execute instructions readable by the at least one computer device, With the aforementioned at least one processor, Upon receiving a data change request for data in a relational database, Based on the linkage relationships in the data corresponding to the aforementioned data change request, capture the data before the change, The data corresponding to the aforementioned data change request will be changed, Based on the relationships in the modified data, capture the modified data, The captured pre-change data and the captured post-change data are merged to extract the data whose linkage relationship has changed. A data change detection system characterized by the following features.
13. The data change detection system according to claim 12, characterized in that the aforementioned relationship includes a relationship established between records belonging to different tables in the relational database.
14. The aforementioned relationship is set by selecting one of the following: a one-to-one relationship established between one record in the source table of a relational database and one record in the destination table; a one-to-many relationship established between multiple records in the source table and one record in the destination table; or a many-to-many relationship established between multiple records in the source table and multiple records in the destination table. The one-to-one relationship and the one-to-many relationship are established by storing in the source table the identifier of the record in the destination table that has a relationship with the record in the source table. The many-to-many relationship is established through a connection table that includes information about the relationship between identifiers of multiple records in the source table and identifiers of multiple records in the destination table. A data change detection system according to claim 12, characterized by the above.
15. The step of capturing the data before the change is: Capture the pre-change data, which includes the identifier of the first record containing the data corresponding to the data change request, the identifier of the second record with which a linkage relationship was established before the data change, and the identifier of the third record whose linkage relationship with the record was terminated by the change to the first record. The step of capturing the modified data is as follows: Capture the modified data, which includes the identifier of the first record and the identifier of the fourth record whose relationship with the first record was established after the data was modified. A data change detection system according to claim 12, characterized by the above.
16. The aforementioned merging step is, The data change detection system according to claim 15, characterized by merging the identifier of the second record and the identifier of the fourth record to extract the identifier of the record in which a change in the linkage relationship has occurred.