WO2011157034A1 - 一种实现数据库触发器功能的方法及装置 - Google Patents

一种实现数据库触发器功能的方法及装置 Download PDF

Info

Publication number
WO2011157034A1
WO2011157034A1 PCT/CN2010/079621 CN2010079621W WO2011157034A1 WO 2011157034 A1 WO2011157034 A1 WO 2011157034A1 CN 2010079621 W CN2010079621 W CN 2010079621W WO 2011157034 A1 WO2011157034 A1 WO 2011157034A1
Authority
WO
WIPO (PCT)
Prior art keywords
trigger
database
record
level
file
Prior art date
Application number
PCT/CN2010/079621
Other languages
English (en)
French (fr)
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 中兴通讯股份有限公司
Publication of WO2011157034A1 publication Critical patent/WO2011157034A1/zh

Links

Classifications

    • 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/21Design, administration or maintenance of databases

Definitions

  • a trigger in a database is a stored procedure that improves the execution efficiency of an embedded system.
  • a trigger in an embedded database when data changes, whether it is to add, delete, or modify data, you need to notify the application, notify the data that it cares about, and the specific changes.
  • the role of the trigger is to improve the real-time nature of the system and enhance the synchronization of the system to external data.
  • the trigger registration module is used to register a trigger, provides a trigger registration structure, a registration method, etc.; the trigger detection module, according to the trigger of the registered table, obtains the table record according to a certain parsing method, and needs to be taken out.
  • the message distribution module searches for a stored procedure that invokes application registration according to the registration trigger, and implements message distribution of the application.
  • the smallest processing unit that a trigger can detect is a field that implements logging and field-level triggering.
  • the database triggers the notification application.
  • the registered level is the record level, one record changes and the application is notified once. This is the record level trigger.
  • the field level is registered, if a field in the registered field changes, the corresponding application is notified, but a record is used as the check unit. If the number of records in the table is large, and the modified object is for the table, and many records of the table have changed, then many times of triggering will occur.
  • the application needs to know the change of the table, first need to register a record or field-level trigger, then it will trigger when each record changes, it can only determine that a record of the table has changed, can not be sure In a process, when all records of a table change are completed At the point, you cannot distinguish between the last and the next operation of a table. Such a trigger cannot implement table-level triggering requirements.
  • the so-called table-level trigger is that in one operation, when the process ends, the application only needs to know whether the table it cares about changes, and only needs to notify the table change at the end of the process or the table operation is completed, the application It is ok to receive a trigger message.
  • the technical problem to be solved by the present invention is to provide a method and apparatus for implementing a database trigger function, which is used to solve the problem that the application module database data cannot be notified in a table unit in the prior art.
  • the present invention provides a method for implementing a database trigger function, the method comprising the following steps: a registry level trigger; when a file needs to be added to a database, obtaining the file needs to be loaded. a table record, and compare the obtained table record with the table record in the database; when the obtained table record changes, the database performs data update, according to the registered table-level trigger, distributes the message about the change of the table in the database .
  • a registry-level trigger if the triggering time point of the registration is a unified processing trigger after the end of the entire process operation, the message about the change of the table involved in the database is uniformly distributed after the end of the entire process operation.
  • the registry level trigger if the triggering time point of the registration is the unified processing trigger after the end of the file end operation, after the end of the file operation, the message in the database of the change of the table involved in the file is uniformly distributed in the database. . Further, in the registry level trigger, if the triggering time point of the registration is the unified processing trigger after the end of the table operation, after the end of the table operation, the message in the database that changes the table is uniformly distributed.
  • the present invention further provides an apparatus for implementing a database trigger function, the apparatus comprising: a registration unit, configured to be a registry level trigger; and a comparison unit, configured to acquire the file when a file needs to be added to the database.
  • the table record to be loaded, and the obtained table record is compared with the table record in the database; the message distribution unit is configured to update the database when the acquired table record changes, according to the registered table level trigger, distribute A message about a change in the table in the database.
  • the message distribution unit uniformly distributes the database in the database after the end of the entire flow operation The message that the table involved changes.
  • the registration unit registry level trigger if the triggering time point of the registration is a unified processing trigger after the end of the file end operation, the message distribution unit uniformly distributes the database in the distribution database after the file operation ends.
  • the device further includes: a determining processing unit, configured to: when the database data is updated, determine whether the field level trigger is registered when the acquired table record is changed, and if yes, trigger the field level trigger; And further determining whether a record level trigger is registered, and if so, triggering the record level trigger, and if not, distributing, by the message distribution unit, a message regarding a change in the table in the database according to the registered table level trigger.
  • a determining processing unit configured to: when the database data is updated, determine whether the field level trigger is registered when the acquired table record is changed, and if yes, trigger the field level trigger; And further determining whether a record level trigger is registered, and if so, triggering the record level trigger, and if not, distributing, by the message distribution unit, a message regarding a change in the table in the database according to the registered table level trigger.
  • the beneficial effects of the present invention are as follows:
  • the present invention implements a function of triggering a table unit to notify the application module that the database data changes.
  • the database trigger function is enriched, the application requirement of the table triggering is satisfied, the time for processing the database trigger is saved, and the efficiency of real-time data synchronization in the foreground is improved.
  • FIG. 1 is a schematic structural diagram of a trigger unit in the prior art
  • FIG. 2 is a flowchart of a method for implementing a database trigger function according to an embodiment of the present invention
  • FIG. 3 is a further implementation database in an embodiment of the present invention
  • FIG. 4 is a flowchart of a file parsing step in a method for implementing a database trigger function according to an embodiment of the present invention
  • FIG. 5 is a flowchart of implementing a database trigger function according to an embodiment of the present invention
  • FIG. 6 is a flowchart of processing when a table level trigger coexists with other types of triggers in a method for implementing a database trigger function according to an embodiment of the present invention
  • FIG. 7 is an embodiment of the present invention
  • an embodiment of the present invention relates to a method for implementing a database trigger function, including the following steps: Step S101, a registry level trigger.
  • the application registers a table-level trigger, and the registration trigger contains a follow-up message that triggers the notification.
  • the structure members that must be included in the registration trigger are as follows:
  • Trigger type Table level trigger
  • a table identifier which is used to indicate a specific table that needs to trigger a notification, and can uniquely represent a table
  • Trigger time point Since some tables in the database need to be replaced with external data as a whole, or some records in the table need partial replacement to complete the update.
  • An external file can be a single file or multiple files. The file can contain multiple tables or a single table. Therefore, at the trigger time point, there are three cases: namely: each table is updated after the trigger, each file is updated, and all files are updated (ie: triggered after the end of the entire process). Therefore, when a registry-level trigger is required, a specific trigger time point needs to be registered, namely: Registration is one of the following three cases:
  • Process_Unit The end of the operation in the entire process (possibly multiple file collections), unified processing of application triggers;
  • File_Unit takes a file (possibly a multi-table file or a single-table file) as a unit, and uniformly processes the application trigger after the file operation ends;
  • Table_Unit in table units, when a table operation ends, unified processing application trigger
  • Trigger notification object The notified application is implemented by setting the application identifier (used to uniquely identify the notified object). In addition, it is necessary to verify the registration content, verify the correctness of the table identification, verify the trigger type, and whether the school-risk structure is correct.
  • a table-level trigger is generated, there is a specific flag that tells the database whether the following operations need to perform a table-level trigger check.
  • Step S102 When a file needs to be added to the database, obtain a table record that needs to be loaded by the file, and compare the obtained table record with the table record in the database.
  • a file is a file that needs to be added to the database. These files, which are used to replace all or part of the data in the relevant tables in the database, can be one file or multiple files.
  • the file can contain multiple tables or only one table.
  • Step S103 When the acquired table record changes, the database performs data update, and distributes a message about a change of the table in the database according to the registered table level trigger.
  • the Compare_Flag comparison flag When the Compare_Flag comparison flag is set, all the obtained table records are compared with the table records in the database memory, and the file writing operation is performed, that is, the database data is updated. After the execution of the write operation is completed, the trigger is performed according to the registered table-level trigger, and the registered trigger information retrieves the notified application that needs to be notified.
  • the triggering time point of the registration is Table_Unit
  • a trigger is triggered, and the changed table identifier is notified to the corresponding application module to complete the message distribution.
  • the triggering time point of the registration is File_Unit
  • the triggering is performed, and the changed application identifier of the file is notified to the corresponding application module to complete the message distribution.
  • the triggering time point of the registration is Process_Unit, after the entire process completes the data update, the changed table identifier related to the process is notified to the corresponding application module, and the message distribution is completed.
  • the condition for implementing the table-level trigger execution is: When all the XML files containing a large number of tables are successfully added to the database, the contents of the table in the XML file need to be compared with the current contents of the database in the database. If the contents of the table change, when all the tables are loaded, some application modules need to reply to the trigger message.
  • the embodiment of the present invention relates to a method for implementing a database trigger function, including the following steps: Step S201, start. Step S202, a registry level trigger, this step is the same as step S101 of the above method, and this step is not described in detail.
  • Step S203 determining whether the registered trigger is legal, and verifying the correctness of the checklist, checking - the risk trigger type, whether the school-risk structure is correct or not; if it is legal, go to step S204; if it is not, go to step S208.
  • Step S204 further determining whether a file is added to the database, that is, determining whether the numerical control library needs to perform data update, and if yes, proceeding to step S205; if not, indicating that the current database does not need to be updated, and it is necessary to continue to determine whether a file is added to the database. Until there is a file to join the database.
  • Step S205 Obtain a table record to be loaded from a file that needs to be added to the database, and compare the obtained table record with the table record in the database.
  • the file added to the database needs to be parsed.
  • the specific steps of the parsing are as shown in FIG. 4, and the following steps are included: Step S2051: parsing the file added to the database, and obtaining the table identifier included in the database; Step S2052, the judgment table Indicate whether the table level trigger is registered, if yes, go to step S2053, if no, go to step S2054; Step S2053, set the comparison identifier Compare that needs to compare the parsed table record with the current table record in the database -Flag; Step S2054, acquire all records of the table.
  • Step S206 after comparing the obtained table record with the table record in the database, determining whether the acquired table record is changed relative to the table record in the database, and if the table is changed after the comparison, further determining Whether the table has been set to the table change identifier, if it has been set, skip the check; if not, set the table change identifier, go to step S207; if it is found that there is no change, then the trigger is not executed, go to step S204.
  • Step S207 querying the registration trigger structure, obtaining a service that needs to be answered, and distributing the message.
  • This step 4 includes the following steps: If the registration is Process_Unit, when the checklist has changed, insert the trigger structure into the process end trigger queue, and the file that is read again is the identifier of the table. Do not continue checking, skip directly. If there is no change, continue to check the read table. If it has not been, then keep checking until the end of the process. If you are registering File_Unit, check that the trigger structure has been changed, and insert this trigger structure into the file end trigger queue. If the identifier of this table is read in this file that is read again, it will not continue to check and skip directly. If there is no change, continue to check the read table. If it has not been, then the check only lasts until the end of this file.
  • the file will be read, and when the registry is changed, the trigger structure is inserted into the table end trigger queue, and the notification execution is triggered.
  • the change indication of the table can be used as a basis for judging whether it needs to be checked in the future. If it is found that the logo is set, no comparison is needed. If not, it needs to be compared. When there are many tables, the change of each table is indicated by setting the bits, and the flag is cleared at the end of each process. Insert the changed table message into the queue generated by the table-level trigger. The message inserted into the queue contains the registry-level trigger structure and the transformation state of the table.
  • the table-level triggers the generated queue, when the registered type is When the table operation ends, the callback function is executed, and the message about the change of the table in the database is uniformly distributed; after the file ends, the generated file trigger queue is traversed, and when the registered type is triggered when the file operation ends, the execution is executed.
  • the callback function in the unified distribution database, the message about the change of the table involved in the file; after the end of the process, traversing the generated process trigger queue, when the registered type is triggered by the end of the flow operation, the callback function is executed, and the unified distribution is performed. A message that the table involved in the database has changed. Step S208, ending.
  • Step S301 After the registry level trigger, when there is a file to be added to the database, the file is parsed to determine whether the comparison identifier is set, if yes, then go to step S303, if no, then step 4 to S313 Step S303, comparing the obtained table record with the table record in the database; step S304, determining whether the table has a change, if yes, proceeding to step S305; if not, Step S305, determining whether the registered trigger time point is the table operation end trigger, if yes, then step 4 gathers S306; if no, then step 4 gathers S307; step S306, after the table operation ends Traversing the queue generated by the table level triggering, triggering, uniformly distributing the message in the database about the change of the table; Step S307, setting the flag
  • step S313 If no, it means that there is no registry level trigger, then go to step S313; step S313, end.
  • the method for implementing the database table level trigger function in the foregoing embodiment may also coexist with the field level trigger and the record level trigger, that is, a table may also register the record level and the field level if the table level trigger is registered. This can coexist.
  • the table level trigger and other trigger types do not affect each other at the time of triggering, and table level triggers and other triggers are generated at the same time. As shown in FIG.
  • Step S401 start
  • Step S402 After the registry-level trigger, when a file needs to be added to the database, the file is parsed, and after comparison, it is determined whether the record of the registered table has changed. If yes, go to step S403. If no, repeat this step and wait for the next file to be added to the database.
  • Step S403 determining whether a field-level trigger is registered, if yes, proceeding to step S404, if no, proceeding to step S405; step S404, triggering a field-level trigger, that is, a field in the registered field occurs After the change, the corresponding application is notified, but a record is used as the check unit.
  • Step S405 determining whether the trigger of the record level is registered, if yes, proceeding to step S406, if no, proceeding to step S407; step S406, triggering the trigger of the record level, that is: when there is one record in the registered data If the change occurs, the application is notified once; Step S407, it is determined whether the table level trigger is registered, if yes, then go to step S408, if no, go to step S402; Step S408, perform table level trigger processing, the specific steps are as before Description, this step will not be described in detail; Step S409, End. Below, there are two specific examples for detailed description: The first instance: only the instance of the registry-level trigger;
  • Registration trigger here register a special case, multiple references register the same table, but require different trigger timing:
  • Application A registers the table-level trigger triggerger, registration content: Trigger type: Table-level trigger trigger object: Tableld; Trigger time point: Table_Unit triggers the notification object: A;
  • Application B registers the table-level trigger triggerb, registration content: Trigger type: Table-level trigger Trigger object: Tableld; Trigger time point: File_Unit Trigger notification object: B;
  • Application C registered table-level trigger triggerc registration content: Trigger type: Table-level trigger trigger object: Tableld; Trigger time point: Process— Unit trigger notification object : C; Initiated database operation flow, initiation message, the included structure must be declared: Number of files: 2 File name: FileFirst FileSecond The contents of each file from the external storage that needs to be written to the database to carry data, where FileSecond and The format of a table is the same:
  • the checklist ends the trigger queue, obtains the triggera type, and notifies the application A. Clear the table end trigger queue. If there is no change, proceed to the next table Tableldtwo.
  • Trigger Type Table Level Trigger
  • Trigger notification object A;
  • Application B registered the record-level trigger triggerb, registration content:
  • Trigger type Record level trigger
  • Trigger INSERT
  • Trigger notification object B;
  • the initiated database operation process the initiation message, the included structure must be declared: Number of files: 1
  • an embodiment of the present invention further relates to an apparatus for implementing a database trigger function, including: a registration unit 501 for a registry level trigger; and a comparison unit 502, configured to: when a file needs to be added to a database, Obtaining the table record that the file needs to be loaded, and comparing the obtained table record with the table record in the database; the message distribution unit 503 is configured to: when the acquired table record changes, the database performs data update according to the registered table level. Trigger, which distributes messages about changes to tables in the database.
  • the determining processing unit 504 is configured to: when the acquired database record changes, determine whether the field level trigger is registered when the database data is updated, and if yes, trigger the field level trigger; if not, further determine whether the registration is performed.
  • a record-level trigger if so, triggers a record-level trigger, and if not, a message about changes in the table in the database is distributed by the message distribution unit 503 in accordance with the registered table-level trigger.
  • the registration unit 501 is a registry-level trigger, if the triggering time point of the registration is a unified processing trigger after the end of the entire flow operation, the message distribution unit 503 uniformly distributes the information involved in the database after the end of the entire flow operation.
  • the table changes the message.
  • the message distribution unit 503 When registering the unit 501 registry level trigger, if the triggering time point of the registration is the unified processing trigger after the end of the file end operation, the message distribution unit 503 uniformly distributes the database regarding the file after the file operation ends. The table changes the message.
  • the registration unit 501 is a registry level trigger
  • the triggering time point of the registration is a unified processing trigger after the end of the table operation
  • the message distribution unit 503 uniformly distributes the changes in the database regarding the table after the table operation ends. Message. It can be seen from the above embodiment that the present invention implements a function of triggering a table unit to notify the application module that the database data changes.
  • the change information of the concern table can be received, and then the final change time point of the table can be determined, the information of the change of the table change is avoided, and the efficiency of the database is improved.
  • the method of the invention enriches the database trigger function, satisfies the application requirements of the table triggering, saves the time for the database processing trigger, and improves the real-time synchronization efficiency of the foreground data. While the preferred embodiments of the present invention have been disclosed for purposes of illustration, those skilled in the art will recognize that various modifications, additions and substitutions are possible, and the scope of the invention should not be limited to the embodiments described above.

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

一种实现数据库触发器功能的方法及装置 技术领域 本发明涉及通讯技术领域, 特别是涉及一种实现数据库触发器功能的方 法及装置。 背景技术 数据库中的触发器, 是一种提高嵌入式系统执行效率的存储过程。 在嵌 入式数据库中, 当数据发生变化的时候, 不论是对数据进行增加、 删除, 还 是修改, 都需要通知应用, 通知其关心的数据发生了改变, 以及具体改变的 内容。 触发器的作用就是提高系统的实时性, 增强系统对外部数据的同步功 能。 嵌入式数据库触发器的具体实现, 以及模块之间的协作关系, 数据的处 理流程, 如图 1所示。 其中, 触发器注册模块, 是用来注册触发器, 提供有 触发器注册结构, 注册方式等; 触发器检测模块, 根据注册的表的触发器, 按照一定的解析方式获取表记录, 取出需要进行触发的表的记录内容; 解析 模块, 取出需要进行检查的表内容之后, 负责辨别表是否发生变化, 将新数 据与老数据按照某种算法进行对比检查; 消息通知模块, 如果发生变化就要 使用消息分发模块, 根据注册触发器寻找调用应用注册的存储过程, 实现应 用的消息分发。 目前, 触发器可以检测到的最小的处理单元是字段, 实现有记录和字段 级的触发, 当有注册的数据发生变化的时候, 数据库就会触发通知应用。 当 注册的级别是记录级的时候, 有一条记录发生变化, 就会通知应用一次, 这 就是记录级触发。 当注册的是字段级的时候, 如果注册的字段中的一个字段 发生变化, 就会通知相应的应用, 但是还是以一条记录为检查单元。 如果表 的记录条数很多,修改的对象又是针对表的,表的很多条记录都发生了变化, 那么就会产生很多次的触发。 如果应用需要知道表的变化, 首先需要注册一个记录或者字段级的触发 器, 那么它将会在每条记录发生变化的时候都触发, 它只能确定表的一条记 录发生了变化, 不能确定在一次流程当中, 一张表的所有记录变化完成的时 间点, 不能分清一张表的上一次与下一次操作。 这样的触发器无法实现表级 触发需求。 所谓的表级触发, 就是在一次操作中, 当流程结束的时候, 应用 只需要知道它所关心的表是否变化, 而且只需要在流程结束的时候通知它表 变化了或者表操作完成了, 应用接收到一次触发消息就可以了。 另外, 数据库作为一个嵌入式系统的底层模块, 在设计上要考虑效率问 题, 然而目前触发器的这种做法, 在很大程度上就降低了数据库的效率。 当 一张表存在的记录比较多的时候, 由于需要重复触发, 会大量占用数据库进 程的时间, 降低数据库的实时操作性能。 发明内容 本发明要解决的技术问题是提供一种实现数据库触发器功能的方法及装 置, 用以解决现有技术中不能以表为单位通知应用模块数据库数据变化的问 题。 为解决上述技术问题, 一方面, 本发明提供一种实现数据库触发器功能 的方法, 所述方法包括以下步 4聚: 注册表级触发器; 当有文件需要加入数据库时, 获取该文件需要加载的表记录, 并将获取 的表记录与数据库中的表记录进行对比; 当获取的表记录发生变化时, 数据库进行数据更新, 根据注册的表级触 发器, 分发关于数据库中表发生变化的消息。 进一步, 在注册表级触发器时, 如果注册的触发时间点为在整个流程操 作结束后, 统一处理触发, 则在整个流程操作结束之后, 统一分发关于数据 库中所涉及的表发生变化的消息。 进一步, 在注册表级触发器时, 如果注册的触发时间点为在文件结束操 作结束后, 统一处理触发, 则在该文件操作结束之后, 统一分发数据库中关 于该文件涉及的表发生变化的消息。 进一步, 在注册表级触发器时, 如果注册的触发时间点为在表操作结束 后, 统一处理触发, 则在该表操作结束之后, 统一分发数据库中关于该表发 生变化的消息。 进一步, 当获取的表记录发生变化时, 在数据库进行数据更新时, 还包 括以下步 4聚: 判断是否注册了字段级触发器, 如果是, 则触发字段级触发器; 如果否, 则进一步判断是否注册了记录级触发器, 如果是, 则触发记录级触发器, 如 果否, 则根据注册的表级触发器, 分发关于数据库中表发生变化的消息。 另一方面, 本发明还提供一种实现数据库触发器功能的装置, 所述装置 包括: 注册单元, 用于注册表级触发器; 对比单元, 用于当有文件需要加入数据库时, 获取该文件需要加载的表 记录, 并将获取的表记录与数据库中的表记录进行对比; 消息分发单元, 用于当获取的表记录发生变化时,数据库进行数据更新, 根据注册的表级触发器, 分发关于数据库中表发生变化的消息。 进一步, 在所述注册单元注册表级触发器时, 如果注册的触发时间点为 在整个流程操作结束后, 统一处理触发, 则所述消息分发单元在整个流程操 作结束之后, 统一分发关于数据库中所涉及的表发生变化的消息。 进一步, 在所述注册单元注册表级触发器时, 如果注册的触发时间点为 在文件结束操作结束后, 统一处理触发, 则所述消息分发单元在该文件操作 结束之后, 统一分发数据库中关于该文件所涉及的表发生变化的消息。 进一步, 在所述注册单元注册表级触发器时, 如果注册的触发时间点为 在表操作结束后,统一处理触发, 则所述消息分发单元在该表操作结束之后, 统一分发数据库中关于该表发生变化的消息。 进一步, 所述装置还包括: 判断处理单元, 用于当获取的表记录发生变化时,在数据库数据更新时, 判断是否注册了字段级触发器, 如果是, 则触发字段级触发器; 如果否, 则 进一步判断是否注册了记录级触发器, 如果是, 则触发记录级触发器, 如果 否, 则根据注册的表级触发器, 由所述消息分发单元分发关于数据库中表发 生变化的消息。 本发明有益效果如下: 本发明实现了以表为单位触发, 通知应用模块数据库数据发生变化的功 能。 釆用本发明的方法, 丰富了数据库触发器功能, 满足了表记触发的应用 要求, 节省了数据库处理触发器的时间,提高了前台的数据实时同步的效率。 附图说明 图 1是现有技术中触发器单元结构示意图; 图 2是本发明实施例中一种实现数据库触发器功能的方法的流程图; 图 3是本发明实施例中再一种实现数据库触发器功能的方法的流程图; 图 4是本发明实施例中一种实现数据库触发器功能的方法中文件解析步 骤的流程图; 图 5是本发明实施例中一种实现数据库触发器功能的方法中多类型触发 的处理流程图; 图 6是本发明实施例中一种实现数据库触发器功能的方法中表级触发与 其它类型触发器共存时的处理流程图; 图 7 是本发明实施例中一种实现数据库触发器功能的装置的结构示意 图。 具体实施方式 为了解决现有技术中不能以表为单位通知应用模块数据库数据变化的问 题, 本发明提供了一种实现数据库触发器功能的方法及装置, 以下结合附图 以及实施例, 对本发明进行进一步详细说明。 应当理解, 此处所描述的具体 实施例仅仅用以解释本发明, 并不限定本发明。 如图 2所示, 本发明实施例涉及一种实现数据库触发器功能的方法, 包 括以下步 4聚: 步骤 S 101 , 注册表级触发器。 应用注册一个表级触发器, 注册触发器包含后续消息触发需要通知的具 体应用标识, 以及需要触发的表标识等。 注册触发器必须包括的结构成员如 下:
1 ) 触发类型: 表级触发;
2 ) 触发对象:
3 ) 表标识, 用来表示需要触发通知的具体的表, 可以唯一的表示一张 表;
4 ) 触发时间点: 由于数据库中的一些表需要用外部数据整体替换, 或 者表中的一些记录需要部分替换完成更新。 外部文件可以是一个文件, 也可 以是多个文件, 文件中可以包含多张表或者一张表。 因此, 在触发时间点上, 就存在三种情况: 即: 每张表更新完触发, 每个文件更新完触发, 以及所有 文件更新完触发(即: 整个流程操作结束后触发)。 因此, 在注册表级触发器 时, 需要注册具体的触发时间点, 即: 注册为以下三种情况中的一种:
A ) , Process_Unit: 在整个流程 (可能是多个文件集合) 操作结束, 统 一处理应用触发;
B ) , File_Unit: 以一个文件 (可能是多表文件, 也可能是单表文件) 为 单位, 在文件操作结束后, 统一处理应用触发;
C ) , Table_Unit: 以表为单位, 当一个表操作结束后, 统一处理应用触 发;
5 ) 触发通知对象: 被通知的应用, 通过设置应用标识 (用来唯一标识 被通知对象) 实现。 另外, 还需要对注册内容进行校验, 校验表标识的正确性, 检验触发类 型, 校 -险结构是否正确。 在产生表级触发的时候, 会有一个具体标识位用来 告诉数据库, 下面的操作是否需要执行表级触发的检查操作。 步骤 S 102,当有文件需要加入数据库时,获取该文件需要加载的表记录, 并将获取的表记录与数据库中的表记录进行对比。 当数据库中的一些表需要用外部数据整体替换, 或者表中的一些记录需 要部分替换,进行数据更新时,这些进行数据替换的 XML( Extensible Markup Language, 可扩展标记语言) 文件就是需要加入数据库的文件。 这些用来替 换数据库中相关表中全部或者部分数据的文件, 可以是一个文件, 也可以是 多个文件, 文件中可以包含多张表, 也可以只有一张表。 解析文件的时候, 获取表开始和结束的标识, 根据注册的触发器结构, 查询是否注册了表级触发器, 如果注册了, 设置对比标识 Compare_Flag, 用 来判定是否需要将解析的数据与目前据库中的表记录进行比较。 在需要解析 的文件比较大的时候, 可以釆用以表为单位分阶段解析的方式。 步骤 S 103 , 当获取的表记录发生变化时, 数据库进行数据更新, 根据注 册的表级触发器, 分发关于数据库中表发生变化的消息。 当设置了 Compare_Flag对比标识, 将获取到的所有的表记录, 与数据库 内存中的表记录进行比对, 执行文件写入操作, 即进行数据库的数据更新。 等写入操作执行完成之后, 根据注册的表级触发器, 进行触发, 注册的触发 器信息检索需要通知的被通知应用。 即, 当注册的触发时间点是 Table_Unit 时, 则在每一张表更新完之后, 进行触发, 将变化的表标识通知给相应的应 用模块, 完成消息分发。 当注册的触发时间点是 File_Unit时, 则在每个文件 更新完之后, 进行触发, 将该文件涉及到的变化的表标识通知给相应的应用 模块, 完成消息分发。 当注册的触发时间点是 Process_Unit时, 则在整个流 程完成数据更新后,将该流程涉及到的变化的表标识通知给相应的应用模块, 完成消息分发。 上述步骤中, 实现表级触发执行的条件是: 将一个包含了很多个表的 XML文件全部加入数据库成功的时候, 需要将 XML文件中的表的内容与数 据库当前的此表内容进行比对, 如果表内容发生了变化, 在将所有的表加载 完成的时候, 需要给一些应用模块回复触发消息。 为更加清楚的描述实现数据库表级触发器功能的方法, 如图 3所示, 本 发明实施例涉及一种实现数据库触发器功能的方法, 包括以下步骤: 步骤 S201 , 开始。 步骤 S202, 注册表级触发器, 本步骤与上述方法的步骤 S 101相同, 本 步骤则不再详细描述。 步骤 S203 , 判断注册的触发器是否合法, 通过校验表标识的正确性, 检 -险触发类型, 校-险结构是否正确来进行判断; 如果合法, 则转步骤 S204; 如 果不合法, 则转步骤 S208。 步骤 S204, 进一步判断是否有文件加入数据库, 即判断数控库是否需要 进行数据更新, 如果是, 则转步骤 S205; 如果否, 则表明目前数据库不需要 进行数据更新, 需要继续判断是否有文件加入数据库, 直到有文件需要加入 数据库。 步骤 S205 , 从需要加入数据库的文件中获取需要加载的表记录, 并将获 取的表记录与数据库中的表记录进行对比。 本步骤需要对加入数据库的文件进行解析,解析的具体步骤如图 4所示, 包括以下步 4聚: 步骤 S2051 , 对加入数据库的文件进行解析, 获取其包含的表标识; 步骤 S2052 , 判断表标识是否注册了表级触发器, 如果是, 则转步骤 S2053 , 如果否, 则转步骤 S2054; 步骤 S2053 , 设置需要将解析的表记录与目前据库中的表记录进行比对 的对比标识 Compare—Flag; 步骤 S2054, 获取表的所有记录。 步骤 S206 , 在将获取的表记录与数据库中的表记录进行对比之后, 判断 获取的表记录, 相对于数据库中的表记录, 是否发生了变化, 如果比对之后, 发现表有变化,进一步判断此表是否已经设置了表变化标识,如果已经设置, 则跳过检查; 如果没有, 则设置表变化标识, 转步骤 S207; 如果发现没有变 化, 则不执行触发, 转步骤 S204。 步骤 S207, 查询注册触发器结构, 获取需要应答的业务, 分发消息。 本步 4聚具体包括以下步 4聚: 如果注册的是 Process_Unit, 检查到表已经发生了变化的时候, 将此触 发结构插入流程结束触发队列, 对再次读入的文件中是此表标识的就不再继 续检查, 直接跳过。 如果没有发生变化, 就对读入的表继续检查, 如果一直 没有, 那么就要一直检查持续到流程结束。 如果注册的是 File_Unit, 检查到表已经发生了变化的时候, 将此触发结 构插入文件结束触发队列。 对再次读入的本文件中是此表标识的就不再继续 检查, 直接跳过。 如果没有发生变化, 就对读入的表继续检查, 如果一直没 有, 那么检查只是持续到本文件结束。 在下一个读入的文件, 重新检查, 是 否需要触发。 如果注册的是 Table_Unit, 将读入的文件, 发现注册表变化的时候, 将 此触发结构插入表结束触发队列, 触发通知执行。 表的变化标示可以作为以后是否需要检查的判断依据, 如果发现设置了 标识就不需要对比了, 如果没有, 就还需要对比。 当表很多的时候, 通过设 置比特位来表示每一个表的变化情况,在每一次流程结束的时候, 清除标志。 将变化的表消息插入表级触发生成的队列, 插入队列的消息包含注册表级触 发器结构, 以及表的变换状态; 等表操作结束之后, 遍历表级触发生成的队列, 当注册的类型是表操作 结束就触发, 就执行回调函数, 统一分发数据库中关于该表发生变化的消息; 在文件结束之后, 遍历生成的文件触发器队列, 当注册的类型是文件操作结 束就触发时, 就执行回调函数, 统一分发数据库中关于该文件涉及的表发生 变化的消息; 在流程结束之后, 遍历生成的流程触发器队列, 当注册的类型 是流程操作结束就触发, 就执行回调函数, 统一分发关于数据库中所涉及的 表发生变化的消息。 步骤 S208, 结束。 在上述方法中,可以注册多种触发类型, 即可以注册不同的触发时间点, 如图 5所示, 具体步骤如下 (与上述步骤相同或相似的步骤, 则不再详细描 述): 步骤 S301 , 开始; 步骤 S302, 在注册表级触发器之后, 当有文件需要加入数据库时, 对文 件进行解析, 判断是否设置了对比标识, 如果是, 则转步骤 S303 , 如果否, 则转步 4聚 S313; 步骤 S303 , 将解析获取的表记录与数据库中的表记录进行对比; 步骤 S304, 判断表是否有变化, 如果有, 则转步骤 S305; 如果没有, 则转步 4聚 S313; 步骤 S305 , 判断注册的触发时间点是否为表操作结束触发, 如果是, 则 转步 4聚 S306; 如果否, 则转步 4聚 S307; 步骤 S306, 表操作结束之后, 遍历表级触发生成的队列, 进行触发, 统 一分发数据库中关于该表发生变化的消息; 步骤 S307, 设置表变化的标志; 步骤 S308, 文件操作完成之后, 即本文件的数据在数据库更新之后, 检 测文件触发器队列, 即判断文件触发器队列中是否有数据; 步骤 S309,判断注册的触发时间点是否为文件操作结束后触发,如果是, 则转步骤 S311 , 如果否, 则转步骤 S310; 步骤 S310, 流程操作完成之后, 即所有文件的数据在数据库更新之后, 检测流程触发器队列, 即判断流程触发器队列中是否有数据; 步骤 S311 ,执行回调函数,统一分发数据库中涉及的表发生变化的消息; 步骤 S312,判断注册的触发时间点是否为流程操作结束后触发,如果是, 则转步骤 S311 , 如果否, 就说明没有注册表级触发器, 则转步骤 S313; 步骤 S313 , 结束。 另外, 上述实施例涉及的实现数据库表级触发器功能的方法, 还可以与 字段级触发和记录级触发共存, 即: 一张表如果注册了表级触发, 也可以注 册记录级和字段级, 这是可以并存的。 当注册的触发类型共存的时候, 表级 触发与其他的触发类型在触发的时候互不影响, 会同时生成表级触发和其他 的触发。 如图 6所示, 实现表级触发与其它类型触发器共存的处理步骤如下 (与上述步 4聚相同或相似的步 4聚, 则不再详细描述 ): 步骤 S401 , 开始; 步骤 S402, 在注册表级触发器之后, 当有文件需要加入数据库时, 对文 件进行解析, 及进行对比之后, 判断注册的表的记录是否发生了变化。 如果 是, 则转步骤 S403 , 如果否, 则重复本步骤, 等待下一个需要加入数据库的 文件; 步骤 S403, 判断是否注册了字段级的触发器, 如果是, 则转步骤 S404, 如果否, 则转步骤 S405; 步骤 S404, 触发字段级的触发器, 即: 在注册的字段中的一个字段发生 变化后, 就会通知相应的应用, 但是还是以一条记录为检查单元。 步骤 S405, 判断是否注册了记录级的触发器, 如果是, 则转步骤 S406, 如果否, 则转步骤 S407; 步骤 S406, 触发记录级的触发器, 即: 当注册的数据中, 有一条记录发 生变化, 就会通知应用一次; 步骤 S407, 判断是否注册了表级触发器, 如果是, 则转步骤 S408, 如 果否, 则转步骤 S402; 步骤 S408, 进行表级触发处理, 具体步骤如前描述, 本步骤不再详细描 述; 步骤 S409, 结束。 下面, 以两个具体实例进行详细说明: 第一个实例: 只注册表级触发器的实例;
1 ) 注册触发器, 这里注册一种特殊情况, 多个引用注册相同的表, 但 是要求不同的触发时机: 应用 A注册了表级触发器 triggera, 注册内容: 触发类型: 表级触发 触发对象: Tableld; 触发时间点: Table_Unit 触发通知对象: A; 应用 B注册了表级触发器 triggerb, 注册内容: 触发类型: 表级触发 触发对象: Tableld; 触发时间点: File_Unit 触发通知对象: B; 应用 C注册了表级触发器 triggerc, 注册内容: 触发类型: 表级触发 触发对象: Tableld; 触发时间点: Process— Unit 触发通知对象: C; 发起的数据库操作流程, 发起消息, 包含的结构体必须声明: 文件个数: 2个 文件名称: FileFirst FileSecond 从外存需要写入数据库的承载数据的各个文件的内容, 其中 FileSecond 和第一张表的格式相同:
FileFirst
/* 第一张表 */
Tableld
/* 表内容 */
Begin
End:
/* 第二张表 */ Tableldtwo:
/* 表内容 */ Begin
End:
2 )获取表 Tableld的内容,成功获取到第一个文件的一张表的记录内容, 检查字表是否注册了表级触发器,获取到注册了 triggera、 triggerb和 triggerc, 就需要设置 Tableld表的 Compare_Flag标识。
3 ) 当表 Tableld操作完成之后, 检查 Compare_Flag标识, 是否设置, 如果设置了, 与数据库内存中的本表 Tableld记录内容进行比较, 如果发生 了变化, 将此信息 triggera插入表结束触发器队列, triggerb插入文件结束触 发器队列, triggerc插入队列结束触发器队列。
4 ) 当表 Tableld操作完成之后, 检查表结束触发队列, 获取到 triggera 类型, 通知应用 A。 清除表结束触发器队列。 如果没有变化, 就继续下一张 表 Tableldtwo的处理。
5 ) 处理 Tableldtwo 的时候, 首先检查是否注册了表级触发器, 发现没 有注册, 于是执行写入数据库的操作, 不记 Tableldtwo 的标志位 Compare Flag, 继续处理。
6 )当文件 FileFirst解析完成之后,检查文件结束触发队列,获取到 triggerb 类型, 数据库操作结束, 通知应用 B。 清除文件结束触发器队列。
7 ) 当文件 FileSecond 解析完成之后, 检查文件结束触发队列, 获取到 triggerb类型, 通^ ^应用 B。
8 ) 流程结束之后, 检查流程结束触发队列, 获取到 triggerc类型, 通知 应用 C。 第二个实例: 与其他触发器共存的实例。 1 ) 注册触发器, 注册有表级触发还有其他类型的触发器: 应用 A注册了表级触发器 triggera, 注册内容:
触发类型: 表级触发
触发对象: Tableld;
触发时间点: Table_Unit
触发通知对象: A;
应用 B注册了记录级触发器 triggerb, 注册内容:
触发类型: 记录级触发
触发对象: Tableld;
触发: INSERT
触发通知对象: B;
发起的数据库操作流程, 发起消息, 包含的结构体必须声明: 文件个数: 1个
文件名 尔: FileFirst
从外存需要写入数据库的承载数据的各个文件的内容:
FileFirst
/* 第一张表 */
Tableld
/* 表内容 */
Begin
Recordl: XXX /* 执行了一个 INSERT插入操作 */ Record2: XXX /* 执行了一个 UPDATE删除操作 */
End:
2 ) 获取表 Tableld的内容, 成功获取到 Tableld的记录 Recordl 内容, 检查注册了的触发器, 获取到注册了 triggera表级触发器、 triggerb记录级触 发器。 有表级触发器注册, 设置 Tableld表的 Compare_Flag标识。
3 )获取一张表 Tableld的第一条记录 Recordl , 正常处理记录级触发器, 检测到是插入操作之后, 产生插入记录级触发器队列。 检查 Compare_Flag 标识置位。 发现如果置位, 就将触发信息插入表操作结束触发器队列, 并且 还需要告诉后面的记录检查不需要再检查此表的表级触发是否变化, 设标志 Table Chaged Flag。
4 ) 当一张表 Tableld的第二条记录 Record2操作完成之后, 没有检查到 注册其他记录级类型的触发器。 发现设置了 Table_Chaged_Flag 标识, 不再 向表结束触发队列插入新的信息。
5 )表处理结束, 检查表结束处理触发队列。 处理 triggera, 给应用 A回 消息。 清除 Tableld的 Table_Chaged_Flag标志。
6 ) 当文件 FileFirst解析完成之后, 检查文件结束触发队列, 没有文件结 束触发队列存在。
7 ) 流程结束之后, 检查流程结束触发队列, 没有流程触发器队列存在。 如图 7所示, 本发明实施例还涉及一种实现数据库触发器功能的装置, 包括: 注册单元 501 , 用于注册表级触发器; 对比单元 502, 用于当有文件需要加入数据库时, 获取该文件需要加载 的表记录, 并将获取的表记录与数据库中的表记录进行对比; 消息分发单元 503 , 用于当获取的表记录发生变化时, 数据库进行数据 更新, 根据注册的表级触发器, 分发关于数据库中表发生变化的消息。 判断处理单元 504, 用于当获取的表记录发生变化时, 在数据库数据更 新时, 判断是否注册了字段级触发器, 如果是, 则触发字段级触发器; 如果 否, 则进一步判断是否注册了记录级触发器, 如果是, 则触发记录级触发器, 如果否, 则根据注册的表级触发器, 由消息分发单元 503分发关于数据库中 表发生变化的消息。 其中, 在注册单元 501注册表级触发器时, 如果注册的触发时间点为在 整个流程操作结束后, 统一处理触发, 则消息分发单元 503在整个流程操作 结束之后, 统一分发关于数据库中所涉及的表发生变化的消息。 在注册单元 501注册表级触发器时, 如果注册的触发时间点为在文件结 束操作结束后, 统一处理触发, 则消息分发单元 503在该文件操作结束之后, 统一分发数据库中关于该文件所涉及的表发生变化的消息。 在注册单元 501注册表级触发器时, 如果注册的触发时间点为在表操作 结束后, 统一处理触发, 则消息分发单元 503在该表操作结束之后, 统一分 发数据库中关于该表发生变化的消息。 由上述实施例可以看出, 本发明实现了以表为单位触发, 通知应用模块 数据库数据发生变化的功能。 在操作流程结束的时候可以收到关心表的变化 信息, 进而可以确定表最终的变化时间点, 避免了重复收到表变化的信息, 提高了数据库的效率。 釆用本发明的方法, 丰富了数据库触发器功能, 满足 了表记触发的应用要求, 节省了数据库处理触发器的时间, 提高了前台的数 据实时同步的效率。 尽管为示例目的, 已经公开了本发明的优选实施例, 本领域的技术人员 将意识到各种改进、 增加和取代也是可能的, 因此, 本发明的范围应当不限 于上述实施例。

Claims

权 利 要 求 书
1. 一种实现数据库触发器功能的方法, 其特征在于, 包括以下步骤: 注册表级触发器;
当有文件需要加入数据库时, 获取该文件需要加载的表记录, 并将 获取的表记录与数据库中的表记录进行对比;
当获取的表记录发生变化时, 数据库进行数据更新, 根据注册的表 级触发器, 分发关于数据库中表发生变化的消息。
2. 如权利要求 1所述的实现数据库触发器功能的方法, 其特征在于, 在注 册表级触发器时, 如果注册的触发时间点为在整个流程操作结束后, 统 一处理触发, 则在整个流程操作结束之后, 统一分发关于数据库中所涉 及的表发生变化的消息。
3. 如权利要求 1所述的实现数据库触发器功能的方法, 其特征在于, 在注 册表级触发器时, 如果注册的触发时间点为在文件结束操作结束后, 统 一处理触发, 则在该文件操作结束之后, 统一分发数据库中关于该文件 涉及的表发生变化的消息。
4. 如权利要求 3所述的实现数据库触发器功能的方法, 其特征在于, 在注 册表级触发器时, 如果注册的触发时间点为在表操作结束后, 统一处理 触发, 则在该表操作结束之后, 统一分发数据库中关于该表发生变化的 消息。
5. 如权利要求 1〜4任一项所述的实现数据库触发器功能的方法, 其特征在 于, 当获取的表记录发生变化时, 在数据库进行数据更新时, 还包括以 下步骤:
判断是否注册了字段级触发器, 如果是, 则触发字段级触发器; 如 果否, 则进一步判断是否注册了记录级触发器, 如果是, 则触发记录级 触发器, 如果否, 则根据注册的表级触发器, 分发关于数据库中表发生 变化的消息。
6. —种实现数据库触发器功能的装置, 其特征在于, 所述装置包括: 注册单元, 用于注册表级触发器; 对比单元, 用于当有文件需要加入数据库时, 获取该文件需要加载 的表记录, 并将获取的表记录与数据库中的表记录进行对比;
消息分发单元, 用于当获取的表记录发生变化时, 数据库进行数据 更新, 根据注册的表级触发器, 分发关于数据库中表发生变化的消息。
7. 如权利要求 6所述的实现数据库触发器功能的装置, 其特征在于, 在所 述注册单元注册表级触发器时, 如果注册的触发时间点为在整个流程操 作结束后, 统一处理触发, 则所述消息分发单元在整个流程操作结束之 后, 统一分发关于数据库中所涉及的表发生变化的消息。
8. 如权利要求 6所述的实现数据库触发器功能的装置, 其特征在于, 在所 述注册单元注册表级触发器时, 如果注册的触发时间点为在文件结束操 作结束后, 统一处理触发, 则所述消息分发单元在该文件操作结束之后, 统一分发数据库中关于该文件所涉及的表发生变化的消息。
9. 如权利要求 6所述的实现数据库触发器功能的装置, 其特征在于, 在所 述注册单元注册表级触发器时, 如果注册的触发时间点为在表操作结束 后, 统一处理触发, 则所述消息分发单元在该表操作结束之后, 统一分 发数据库中关于该表发生变化的消息。
10. 如权利要求 6〜9任一项所述的实现数据库触发器功能的装置, 其特征在 于, 所述装置还包括:
判断处理单元, 用于当获取的表记录发生变化时, 在数据库数据更 新时, 判断是否注册了字段级触发器, 如果是, 则触发字段级触发器; 如果否, 则进一步判断是否注册了记录级触发器, 如果是, 则触发记录 级触发器, 如果否, 则根据注册的表级触发器, 由所述消息分发单元分 发关于数据库中表发生变化的消息。
PCT/CN2010/079621 2010-06-18 2010-12-09 一种实现数据库触发器功能的方法及装置 WO2011157034A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010202877.0A CN102289433B (zh) 2010-06-18 2010-06-18 一种实现数据库触发器功能的方法及装置
CN201010202877.0 2010-06-18

Publications (1)

Publication Number Publication Date
WO2011157034A1 true WO2011157034A1 (zh) 2011-12-22

Family

ID=45335873

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/079621 WO2011157034A1 (zh) 2010-06-18 2010-12-09 一种实现数据库触发器功能的方法及装置

Country Status (2)

Country Link
CN (1) CN102289433B (zh)
WO (1) WO2011157034A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102662995B (zh) * 2012-03-15 2015-09-30 播思通讯技术(北京)有限公司 一种快速定位手机应用数据更新的方法
CN112860740B (zh) * 2019-11-27 2022-12-20 金篆信科有限责任公司 一种触发器实现的方法和装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1673972A (zh) * 2004-08-04 2005-09-28 上海宝信软件股份有限公司 数据库表更新的动态监控系统及方法
CN1892652A (zh) * 2005-07-05 2007-01-10 国际商业机器公司 将文件系统事件集成到关系数据库中的方法和系统
CN101192214A (zh) * 2006-11-27 2008-06-04 中兴通讯股份有限公司 用于内存数据库内容变化实时通知业务的处理方法
CN101202934A (zh) * 2006-12-13 2008-06-18 中兴通讯股份有限公司 用于内存数据库内容变化实时通知业务的处理装置
CN101582071A (zh) * 2008-05-16 2009-11-18 鸿富锦精密工业(深圳)有限公司 数据更新系统及方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101770484B (zh) * 2008-12-31 2012-12-26 北大方正集团有限公司 一种网站更新实时发布的方法及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1673972A (zh) * 2004-08-04 2005-09-28 上海宝信软件股份有限公司 数据库表更新的动态监控系统及方法
CN1892652A (zh) * 2005-07-05 2007-01-10 国际商业机器公司 将文件系统事件集成到关系数据库中的方法和系统
CN101192214A (zh) * 2006-11-27 2008-06-04 中兴通讯股份有限公司 用于内存数据库内容变化实时通知业务的处理方法
CN101202934A (zh) * 2006-12-13 2008-06-18 中兴通讯股份有限公司 用于内存数据库内容变化实时通知业务的处理装置
CN101582071A (zh) * 2008-05-16 2009-11-18 鸿富锦精密工业(深圳)有限公司 数据更新系统及方法

Also Published As

Publication number Publication date
CN102289433B (zh) 2015-03-25
CN102289433A (zh) 2011-12-21

Similar Documents

Publication Publication Date Title
US10175969B2 (en) Data processing for upgrading medical equipment
CN108228814B (zh) 数据同步方法及装置
CN102291416B (zh) 一种客户端与服务器端双向同步的方法及系统
CN107633016B (zh) 数据处理方法及装置和电子设备
US9317518B2 (en) Data synchronization
JP2014523024A (ja) 増分データの抽出
CN102497286A (zh) 一种mib匹配方法和设备
JP2003216445A (ja) コンピュータウイルスのチェック方法
US8738569B1 (en) Systematic verification of database metadata upgrade
CN112148794A (zh) 智能合约的版本管理方法、装置和存储介质
WO2016101759A1 (zh) 一种数据路由方法、数据管理装置和分布式存储系统
WO2011157034A1 (zh) 一种实现数据库触发器功能的方法及装置
CN114564500A (zh) 在区块链系统中实现结构化数据存储和查询的方法和系统
CN109471901B (zh) 一种数据同步方法及装置
JP5537599B2 (ja) 業務システムにおけるバージョンアップ管理方法
CN114185867A (zh) 确认数据一致性的方法、装置和电子设备
CN103778114B (zh) 文件修复系统和方法
CN105786990B (zh) 数据库数据存储和快速查询的方法及装置
US9465687B2 (en) Information processing apparatus and information processing method
JP4795778B2 (ja) データ管理装置、データ管理方法およびプログラム
JP7131106B2 (ja) トランザクション管理装置、トランザクション管理方法及びプログラム
WO2020019418A1 (zh) 数据库配置信息适配方法、装置、计算机设备和存储介质
CN107608662B (zh) 基于MongoDB的分布式计时系统
CN108279939B (zh) 一种Android插件框架支持新增广播接收者的方法、装置及设备
KR101395737B1 (ko) 관계형 데이터베이스에서 익스프레스 무결성 제약조건 확인 방법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10853142

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10853142

Country of ref document: EP

Kind code of ref document: A1