CN102193989B - Graphic database-based online transaction processing system and data insertion method - Google Patents

Graphic database-based online transaction processing system and data insertion method Download PDF

Info

Publication number
CN102193989B
CN102193989B CN201110073794.0A CN201110073794A CN102193989B CN 102193989 B CN102193989 B CN 102193989B CN 201110073794 A CN201110073794 A CN 201110073794A CN 102193989 B CN102193989 B CN 102193989B
Authority
CN
China
Prior art keywords
identifier
transaction
data
target data
record
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201110073794.0A
Other languages
Chinese (zh)
Other versions
CN102193989A (en
Inventor
陈升
于洪方
井卫军
蒋建平
姚福源
刘健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Century Broadband Internet Data Center Co., Ltd.
Original Assignee
BEIJING CENTURY BROADBAND INTERNET DATA CENTER Co Ltd
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 BEIJING CENTURY BROADBAND INTERNET DATA CENTER Co Ltd filed Critical BEIJING CENTURY BROADBAND INTERNET DATA CENTER Co Ltd
Priority to CN201110073794.0A priority Critical patent/CN102193989B/en
Publication of CN102193989A publication Critical patent/CN102193989A/en
Application granted granted Critical
Publication of CN102193989B publication Critical patent/CN102193989B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

The invention provides a graphic database-based online transaction processing system and a data insertion method. The method comprises the following steps of: pre-creating a new transaction, and receiving a transaction identifier of the new transaction, data to be inserted and a target data set identifier in a graphic database; locking the current transaction record corresponding to the transaction identifier to make the current operation of the graphic database serve as the data insertion under the new transaction; the data insertion specifically comprises the specific steps of: adding the target data set identifier to a relevant node field of the current transaction record and writing data to the inserted into a target data set; and unlocking the current transaction record corresponding to the transaction identifier. The embodiment of the invention can solve the technical problems of data conflict existing in the prior art and incomplete data in a database caused by the data conflict.

Description

The online transaction processing system of graphic based database and data insertion method
Technical field
The present invention relates to data processing field, particularly relate to online transaction processing system and the data insertion method of graphic based database.
Background technology
Database (Database) can be thought to organize according to data structure, the warehouse of store and management data, and graphic data base (graphic database) utilizes computing machine the figure fundamental elements such as point, line, surface to be carried out the data acquisition stored by certain data structure.And relational database, be based upon the database on relational model of database basis, carry out the data in process database by means of concept and methodologies such as algebras of sets.In relational database, adopting single data structure to be namely that relation carrys out data of description, is namely that the various contacts between the data in relational database all represent by relation.The logical organization of data can adopt bivariate table to realize.
Usually, in Database Systems, affairs are discrete unit of work.Such as, a db transaction can be account's balance of an amendment user or the write operation of stock item.Online transaction processing system (On-Line Transaction Processing, OLTP) change of the status of the data that are connected with affairs of acquisition process and shared data bank and other file in real time, in Transaction Processing, affairs are performed immediately, a collection of affairs are stored a period of time, and then be performed, suppose that these affairs can complete, the result of OLTP can obtain immediately in this database.Transaction Processing occurs in real time.Such as: civil aviaton's ordering system and ATM in bank are the examples of online transaction processing system.Under sole user, centralized database environment, perform affairs is simple, this is because do not have collision problem or to demand synchronous between database.
Generally, most of OLTP system realizes on large computer system, if affairs must be modified in multiple place, so just needs administrative mechanism to prevent overwrite data and to provide synchronous.And under a distributed environment, write operation often occurs concurrently on multiple database server, such concurrent transaction process needs one " rollback " mechanism, to ensure thrashing in a write operation, still ensures the integrality of database.Which results in the result that affairs may confirm also may abandon together.And if one or more system responses relevant with affairs is inconsistent, just means that fault may appear in system or communication, thus will abandon affairs.
Can find out from said process, when multiple user attempts the same changing data simultaneously, just occur collision problem.Further, no matter be that affairs confirm together or abandon, all can cause the imperfect of data in database.
Summary of the invention
Technical matters to be solved by this invention is to provide a kind of data insertion method be applied in graphic database online transaction, there is conflict and the incomplete technical matters of data in the database that causes of conflicting in order to solve in prior art.
Another object of the present invention is applied in concrete applied environment above-mentioned design, provides a kind of data insertion system be applied in graphic database online transaction, thus ensure realization and the application of the method.
For solving the problems of the technologies described above, embodiments provide a kind of data insertion method of graphic based database, the method comprises: be pre-created new affairs,
Receive the Transaction Identifier of described new affairs, the target data set identifier be inserted in data and graphic data base;
Lock the Current transaction record that described Transaction Identifier is corresponding, so that the current operation of graphic data base is the data insertion under described new affairs; Described data are inserted and are specifically comprised: be added into by described target data set identifier in the associated nodes field of described Current transaction record, and the described data that are inserted into are write described target data set;
Unlock the Current transaction record that described Transaction Identifier is corresponding.
Preferably, described establishment new affairs, specifically comprise:
Generate the Transaction Identifier that an overall situation is unique, and obtain the first system time;
Insert a Current transaction record in the data centralization of the status data of affairs, described Current transaction record comprises described Transaction Identifier and the first system time.
Preferably, also comprise:
When described be inserted into data insert after, the described the first system time is updated to insert complete time the second system time.
Preferably, described the described data that are inserted into are write described target data set, specifically comprise:
Target data record corresponding for described target data set identifier is masked as and is subordinated to described new affairs;
The affairs of described target data set numbering is updated to the Transaction Identifier of described new affairs.
Preferably, the Transaction Identifier of the described new affairs of described reception, be inserted into data and target data set identifier after, also comprise:
Judge that whether described new affairs are effective, if so, then perform the described step locking Current transaction record corresponding to described Transaction Identifier according to described Transaction Identifier, if not, then terminate this secondary data insertion process.
Preferably, after the Current transaction record that the described Transaction Identifier of described unblock is corresponding, also comprise:
Affairs submit state corresponding for described Transaction Identifier is designated effectively;
Target data record corresponding for target data set identifier is designated and is not subordinated to described new affairs; And the field value of the target data set identifier in described target data record is updated to sky;
Delete the Current transaction record that described Transaction Identifier is corresponding.
Preferably, after the Current transaction record that the described Transaction Identifier of described unblock is corresponding, also comprise:
Be effective by transaction rollback status indicator corresponding for described Transaction Identifier;
Delete and the corresponding target data record of described target data set identifier;
Delete the Current transaction record corresponding with described Transaction Identifier.
The embodiment of the present invention additionally provides a kind of online transaction processing system of graphic based database, comprising:
Creation module, for creating new affairs;
Receiver module, for receiving the Transaction Identifier of described new affairs, the target data set identifier be inserted in data and graphic data base;
Locking module, for the Current transaction record that described Transaction Identifier is corresponding, so that the current operation of graphic data base is the data insertion under described new affairs; Described data are inserted and are specifically comprised: be added into by described target data set identifier in the associated nodes field of described Current transaction record, and the described data that are inserted into are write described target data set;
Unlocked state, for unlocking Current transaction record corresponding to described Transaction Identifier.
Preferably, also comprise:
Mark submit state module, is designated effectively by affairs submit state corresponding for described Transaction Identifier;
Mark dirty data module, is not subordinated to described new affairs for being designated by target data record corresponding for target data set identifier; And the field value of the target data set identifier in described target data record is updated to sky;
First removing module, for deleting Current transaction record corresponding to described Transaction Identifier.
Preferably, also comprise:
Mark rollback block of state, for being effective by transaction rollback status indicator corresponding for described Transaction Identifier;
Second removing module, for deleting and the corresponding target data record of described target data set identifier;
Delete the Current transaction record corresponding with described Transaction Identifier.
Compared with prior art, the present invention has the following advantages:
In embodiments of the present invention, when can ensure data inserting in the online transaction processing system of graphic based database, the incomplete technical matters of data in the database existing and conflict and conflict and cause can be solved in prior art, because when carrying out current data and inserting, can lock Current transaction record, even if now there is other data insertion operation, also waiting status can be in.Therefore, the data insertion method disclosed in the present embodiment, can ensure the integrality of data.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the hierarchy schematic diagram of online transaction processing system in the present invention;
Fig. 2 is the process flow diagram of the data insertion method embodiment 1 of a kind of graphic based database of the present invention;
Fig. 3 is the process flow diagram of step 201 in the inventive method embodiment 1;
Fig. 4 is the process flow diagram of the data insertion method embodiment 2 of a kind of graphic based database of the present invention;
Fig. 5 is the process flow diagram of the data insertion method embodiment 3 of a kind of graphic based database of the present invention;
Fig. 6 is the process flow diagram of the data insertion method embodiment 4 of a kind of graphic based database of the present invention;
Fig. 7 is the structural representation of a kind of data insertion system embodiment 1 be applied in graphic database online transaction of the present invention;
Fig. 8 is the structural representation of a kind of data insertion system embodiment 2 be applied in graphic database online transaction of the present invention;
Fig. 9 is the structural representation of a kind of data insertion system embodiment 3 be applied in graphic database online transaction of the present invention.
Embodiment
For enabling above-mentioned purpose of the present invention, feature and advantage become apparent more, and below in conjunction with the drawings and specific embodiments, the present invention is further detailed explanation.
Online transaction processing system of the present invention can adopt top-down three-decker to realize, and shown in figure 1, is the hierarchy schematic diagram of online transaction processing system in the present invention.The superiors are the API (Application Programming Interface, application programming interface) towards external call program.API is some predefined functions, and object is to provide application program and the user ability to access one group of routine based on certain software or hardware, and without the need to accessing source code, or understand the details of internal work mechanism.Middle layer is the affair logic key-course, synchronization zone and asynchronous district is divided into by class of operation, in synchronization zone, content of operation means can only have an operation to carry out at one time, when this operation is carried out, other operate in enter between synchronization zone and all process waiting status, and which can utilize the thread synchronization lockout feature of Java language to realize.The operation of synchronization zone comprises: the expired inspection of affairs, data inserting control, delete Data Control, Update Table controls and disaster recovery.But not the operation of synchronization zone is then unrestricted, all can carry out at any time.The operation in asynchronous district comprises data query and controls.Orlop is store data set (DataSet) interface in the graphic data base of data, preserves the status information of online transaction self in DataSet, and the transaction status attribute information of data.
In graphic data base, the status information of online transaction can be stored in name and be called in the DataSet of graphic_db_tx_def, and the data structure of this DataSet demand fulfillment can be as shown in table 1:
Table 1
And each Node all has a corresponding DataSet of the same name in graphic data base, relation (Relation) information between data then can be kept at name and be called in the DataSet of graphic_db_relation_record_def.These save all default built-in two row as shown in table 2 in the DataSet of Relation information:
Table 2
Based on above-mentioned online transaction processing system, with reference to figure 2, show the process flow diagram of the data insertion method embodiment 1 of a kind of graphic based database of the present invention, can comprise the following steps:
Step 201: be pre-created new affairs.
First need in online transaction processing system, to create new affairs in advance, can carry out the operation of data after setting up new affairs, such as data are inserted.Shown in figure 3, described step 201 can comprise the following steps in actual applications:
Step 301: generate the Transaction Identifier that an overall situation is unique, and obtain the first system time.
When receiving the API Calls creating new affairs, generate the Transaction Identifier that an overall situation is unique.The Transaction Identifier (ID) such as generated can be: 123abc.Such as, and obtain present system time as the first system time, the first system time can be: 1291739790803.
Step 302: insert a Current transaction record in the data centralization of the status data of affairs, described Current transaction record comprises described Transaction Identifier and the first system time.
Such as can be called in the DataSet of graphic_db_tx _ def in name and insert a new record as Current transaction record, each field value of this current transaction journal can be as shown in table 3:
Table 3
tx_no is_commit is_rollback is_timeout start_time associate_node processing
123abc -1 -1 -1 1291739790803 null -1
Step 202: receive the Transaction Identifier of described new affairs, the target data set identifier be inserted in data and graphic data base.
When application call needs the API of data inserting, Transaction Identifier, the data be inserted into and target data set identifier are passed to graphic data base.Wherein, described target data set identifier, for representing the positional information being inserted into data and needing after the insertion to store, is namely deposit which data centralization.
Step 203: lock the Current transaction record that described Transaction Identifier is corresponding, so that the current operation of graphic data base is the data insertion under described new affairs.
Need in this step to open issued transaction mark, be namely find Current transaction record by inquiry graphic_db_tx_def, assuming that Transaction Identifier is 123abc, then the value that the processing of this Current transaction record arranges be set to 1, as shown in table 4:
Table 4
tx_no is_commit is_rollback is_timeout Start_time associate_node processing
123abc -1 -1 -1 1291739790803 null 1
Step 204: described target data set identifier is added in the associated nodes field of described Current transaction record.
The title this data inserting being operated the Node related to is increased to the associated nodes field in Current transaction record.Assuming that in the Current transaction record that Transaction Identifier 123abc is corresponding, application call API needs to be inserted into name to be called in the Node of Customer by being inserted into data, now target data set identifier is Customer, and being namely needs Customer to give associate_node; Information in then corresponding Current transaction record is as shown in table 5:
Table 5
tx_no is_commit is_rollback is_timeout Start_time associate_node processing
123abc -1 -1 -1 1291739790803 Customer 1
It should be noted that, when in identical affairs, if when relating to the Node of multiple target data set, then by the title of multiple Node with CSV.
Step 205: the described data that are inserted into are write described target data set.
Need in this step to be inserted in data write target DataSet.First needing the value by " _ the dirty " of target data record corresponding for target data set arranges to be set to 1, show that these objective data are recorded as dirty data, is namely that these affairs belonging to objective data record are not also submitted to.Again the value that " _ tx_no " arranges is set to Transaction Identifier, is in the present embodiment " 123abc ".
Step 206: unlock the Current transaction record that described Transaction Identifier is corresponding.
Data will be inserted into be written to described target data and concentrate, and also need to close issued transaction mark.Specifically first can inquire about graphic_db_tx_def, if Transaction Identifier is " 123abc ", then the value of the processing row this recorded is set to "-1 ", and Current transaction record now can be as shown in table 6:
Table 6
tx_no is_commit is_rollback is_timeout Start_time associate_node processing
123abc -1 -1 -1 1291739798888 Customer -1
After unlocking Current transaction record, if the follow-up data insertion operation having other under these affairs again, just can continue to perform.
In actual applications, when the present embodiment can ensure data inserting in the online transaction processing system of graphic based database, the incomplete technical matters of data in the database existing and conflict and conflict and cause can be solved in prior art, because when carrying out current data and inserting, can lock Current transaction record, even if now there is other data insertion operation, also waiting status can be in.Therefore, the data insertion method disclosed in the present embodiment, can ensure the integrality of data.
With reference to figure 4, show the process flow diagram of the data insertion method embodiment 2 of a kind of graphic based database of the present invention, the present embodiment can comprise the following steps:
Step 401: receive the Transaction Identifier of described new affairs, the target data set identifier be inserted in data and graphic data base.
This step describes in detail in a upper embodiment, does not repeat them here.
Step 402: judge that whether described new affairs are effective, if so, then enter step 303, if not, then terminate this secondary data insertion process.
The concrete mode judged in the present embodiment can be, inquiry graphic_db_tx_def, and retrieve using Transaction Identifier as filtercondition, if there is one of following situation, then represent that these new affairs are invalid: record does not find, in record, the value of is_commit is 1 (illustrating that affairs are submitted to), and in record, the value of is_rollback is 1 (affairs rollback is described), and in record, the value of is_timeout is 1 (illustrating that affairs are out of date).If affairs are invalid, then terminate this secondary data insertion process, can also error message be returned.
Step 403: lock Current transaction record corresponding to described Transaction Identifier according to described Transaction Identifier.
If the new affairs created are effective, then perform this step.
Step 404: lock the Current transaction record that described Transaction Identifier is corresponding, so that the current operation of graphic data base is the data insertion under described new affairs.
Step 405: described target data set identifier is added in the associated nodes field of described Current transaction record.
Step 406: target data record corresponding for described target data set identifier is masked as and is subordinated to described new affairs.
Namely this step is that the value that " _ dirty " of target data record corresponding for target data set arranges is set to 1, shows that these objective data are recorded as dirty data, is namely that these affairs belonging to objective data record are not also submitted to.
Step 407: the Transaction Identifier affairs of described target data set numbering being updated to described new affairs.
Namely this step is that the value that " _ tx_no " in target data record arranges is updated to Transaction Identifier, is in the present embodiment " 123abc ".
Step 408: unlock the Current transaction record that described Transaction Identifier is corresponding.
Step 409: when described be inserted into data insert after, the described the first system time is updated to insert complete time the second system time.
In the present embodiment, after data are inserted, also comprise the timestamp upgrading Current transaction record, be updated in the start_time row of affiliated transaction journal by up-to-date system time.That supposes Current transaction is numbered 123abc, and current system time is 1291739798888, then the Current transaction record after upgrading can be as shown in table 7:
Table 7
tx_no is_commit is_rollback is_timeout Start_time associate_node processing
123abc -1 -1 -1 1291739798888 Customer 1
With reference to figure 5, show the process flow diagram of the data insertion method embodiment 3 of a kind of graphic based database of the present invention, the present embodiment just can perform after step 206, the method that the present embodiment is introduced also can be called transaction commit method in online transaction processing system, the present embodiment after step 206, can also comprise the following steps:
Step 501: affairs submit state corresponding for described Transaction Identifier is designated effectively.
When affairs need to submit to, the affairs for the new data inserted are submitted to, and first application program calls api interface, and Transaction Identifier is passed to graphic data base.
It should be noted that, before step 501, first can also judge that whether affairs are effective, if affairs are invalid, then terminate these affairs and submit process to, can also error message be returned.If the execution of the effective triggered step 501 again of affairs.Wherein, the whether effective judgment mode of affairs is introduced in example 2, does not repeat them here.
This step can be understood as mark affairs submit state.Inquiry graphic_db_tx_def, assuming that affiliated Transaction Identifier is 123abc, is set to 1 by the value of is_commit row in this Current transaction record, as shown in table 8:
Table 8
tx_no is_commit is_rollback is_timeout Start_time associate_node processing
123abc 1 -1 -1 1291739790803 Customer -1
Step 502: target data record corresponding for target data set identifier is designated and is not subordinated to described new affairs.
Need target data record corresponding for the target data set of data inserting to be designated not to be subordinated to new affairs in this step, namely be the dirty data state of change target data record, be specifically as follows inquiry graphic_db_tx_def, if the field value Customer of the associate_node in Current transaction record, then continue the DataSet that inquiry target data set by name is designated Customer, the value that " _ dirty " of the data record inserted new in this DataSet arranges is set to-1.
Step 503: the field value of the target data set identifier in described target data record is updated to sky.
Namely be that the value of " _ tx_no " in row target data record is set to null in this step.
Step 504: delete the Current transaction record that described Transaction Identifier is corresponding.
Finally delete transaction journal again, this submitted to the record of affairs to be called the DataSet of graphic_db_tx_def from name and delete, complete the submit operation of affairs.
It should be noted that, if affairs are submitted to unsuccessful, then can perform transaction rollback process, with reference to figure 6, show the process flow diagram of the data insertion method embodiment 4 of a kind of graphic based database of the present invention, the present embodiment just can perform after step 206, and the method that the present embodiment is introduced also can be called transaction rollback method in online transaction processing system, after step 206, the present embodiment can comprise the following steps the present embodiment:
Step 601: be effective by transaction rollback status indicator corresponding for described Transaction Identifier.
After application call API, Transaction Identifier is passed to graphic data base by online transaction processing system.
First graphic data base specifically can judge that whether affairs are effective, if affairs are invalid, then terminate the operation of this transaction rollback, can also return error message.
If affairs are effectively, mark transaction rollback state, specifically will inquire about graphic_db_tx_def, assuming that affiliated Transaction Identifier is 123abc, then the value of is_rollback row in Current transaction record is set to 1, as shown in table 9:
Table 9
tx_no is_commit is_rollback is_timeout Start_time associate_node processing
123abc -1 1 -1 1291739790803 Customer -1
Step 602: delete and the corresponding target data record of described target data set identifier.
Need in this step to delete dirty data.Namely be by inquiry graphic_db_tx_def, obtain the value of the row associate_node in Current transaction record, suppose that the value of these row is Customer, then continuing query aim data set identification is the DataSet of Customer, is deleted by the data record inserted new in this DataSet.
Step 603: delete the Current transaction record corresponding with described Transaction Identifier.
Finally again Current transaction record is also deleted.Because be called the DataSet of graphic_db_tx_def from name by the data record of these rollback affairs and delete, the rolling back action of affairs just can be completed.
It should be noted that, for aforesaid each embodiment of the method, in order to simple description, therefore it is all expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not by the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in instructions all belongs to preferred embodiment, and involved action and module might not be that the present invention is necessary.
With reference to figure 7, show the structured flowchart of the online transaction processing system embodiment 1 of a kind of graphic based database of the present invention, can comprise with lower module:
Creation module 701, for creating new affairs;
Receiver module 702, for receiving the Transaction Identifier of described new affairs, the target data set identifier be inserted in data and graphic data base;
Locking module 703, for the Current transaction record that described Transaction Identifier is corresponding, so that the current operation of graphic data base is the data insertion under described new affairs; Described data are inserted and are specifically comprised: be added into by described target data set identifier in the associated nodes field of described Current transaction record, and the described data that are inserted into are write described target data set;
Unlocked state 704, for unlocking Current transaction record corresponding to described Transaction Identifier.
If after data inserting, need affairs to submit to, then except the module shown in Fig. 7, with reference to figure 8, the online transaction processing system of graphic based database also should comprise with lower module:
Mark submit state module 801, is designated affairs submit state corresponding for described Transaction Identifier effectively.
Mark dirty data module 802, is not subordinated to described new affairs for being designated by target data record corresponding for target data set identifier; And the field value of the target data set identifier in described target data record is updated to sky.
First removing module 803, for deleting Current transaction record corresponding to described Transaction Identifier.
If after data inserting, need to carry out transaction rollback, then except the module shown in Fig. 7, with reference to figure 9, the online transaction processing system of graphic based database also should comprise with lower module:
Mark rollback block of state 901, for being effective by transaction rollback status indicator corresponding for described Transaction Identifier.
Second removing module 902, for deleting and the corresponding target data record of described target data set identifier.
3rd removing module 903, for deleting the Current transaction record corresponding with described Transaction Identifier.
It should be noted that, each embodiment in this instructions all adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar part mutually see.For system class embodiment, due to itself and embodiment of the method basic simlarity, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.
It should be noted that, in this article, the such as relational terms of first and second grades and so on is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or equipment.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment comprising described key element and also there is other identical element.
A kind ofly the data insertion method in graphic database online transaction is applied to and the data insertion system be applied in graphic database online transaction is described in detail above to provided by the present invention, apply specific case herein to set forth principle of the present invention and embodiment, the explanation of above embodiment just understands method of the present invention and core concept thereof for helping; Meanwhile, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (10)

1. a data insertion method for graphic based database, is characterized in that, be pre-created new affairs, the method comprises:
Receive the Transaction Identifier of described new affairs, the target data set identifier be inserted in data and graphic data base;
Lock the Current transaction record that described Transaction Identifier is corresponding, so that the current operation of graphic data base is the data insertion under described new affairs; Described data are inserted and are specifically comprised: be added into by described target data set identifier in the associated nodes field of described Current transaction record, and the described data that are inserted into are write described target data set, the Current transaction record that the described Transaction Identifier of described locking is corresponding specifically comprises and arranges process identifier in Current transaction record for process;
Unlock the Current transaction record that described Transaction Identifier is corresponding, so that the follow-up data of carrying out other under these affairs of other users are inserted.
2. the method for claim 1, is characterized in that, described establishment new affairs, specifically comprise:
Generate the Transaction Identifier that an overall situation is unique, and obtain the first system time;
Insert a Current transaction record in the data centralization of the status data of affairs, described Current transaction record comprises described Transaction Identifier and the first system time.
3. method as claimed in claim 2, is characterized in that, also comprise:
When described be inserted into data insert after, the described the first system time is updated to insert complete time the second system time.
4. the method for claim 1, is characterized in that, described the described data that are inserted into is write described target data set, specifically comprises:
Target data record corresponding for described target data set identifier is masked as and is subordinated to described new affairs;
The affairs of described target data set numbering is updated to the Transaction Identifier of described new affairs.
5. the method for claim 1, is characterized in that, the Transaction Identifier of the described new affairs of described reception, be inserted into data and target data set identifier after, also comprise:
Judge that whether described new affairs are effective, if so, then perform the described step locking Current transaction record corresponding to described Transaction Identifier according to described Transaction Identifier, if not, then terminate this secondary data insertion process.
6. the method for claim 1, is characterized in that, after the Current transaction record that the described Transaction Identifier of described unblock is corresponding, also comprises:
Affairs submit state corresponding for described Transaction Identifier is designated effectively;
Target data record corresponding for target data set identifier is designated and is not subordinated to described new affairs; And the field value of the target data set identifier in described target data record is updated to sky;
Delete the Current transaction record that described Transaction Identifier is corresponding.
7. the method for claim 1, is characterized in that, after the Current transaction record that the described Transaction Identifier of described unblock is corresponding, also comprises:
Be effective by transaction rollback status indicator corresponding for described Transaction Identifier;
Delete and the corresponding target data record of described target data set identifier;
Delete the Current transaction record corresponding with described Transaction Identifier.
8. an online transaction processing system for graphic based database, is characterized in that, comprising:
Creation module, for creating new affairs;
Receiver module, for receiving the Transaction Identifier of described new affairs, the target data set identifier be inserted in data and graphic data base;
Locking module, for the Current transaction record that described Transaction Identifier is corresponding, so that the current operation of graphic data base is the data insertion under described new affairs; Described data are inserted and are specifically comprised: be added into by described target data set identifier in the associated nodes field of described Current transaction record, and the described data that are inserted into are write described target data set, the Current transaction record that the described Transaction Identifier of described locking is corresponding specifically comprises and arranges process identifier in Current transaction record for process;
Unlocked state, for unlocking Current transaction record corresponding to described Transaction Identifier, so that the follow-up data of carrying out other under these affairs of other users are inserted.
9. system as claimed in claim 8, is characterized in that, also comprise:
Mark submit state module, is designated effectively by affairs submit state corresponding for described Transaction Identifier;
Mark dirty data module, is not subordinated to described new affairs for being designated by target data record corresponding for target data set identifier; And the field value of the target data set identifier in described target data record is updated to sky;
First removing module, for deleting Current transaction record corresponding to described Transaction Identifier.
10. system as claimed in claim 8, is characterized in that, also comprise:
Mark rollback block of state, for being effective by transaction rollback status indicator corresponding for described Transaction Identifier;
Second removing module, for deleting and the corresponding target data record of described target data set identifier;
Delete the Current transaction record corresponding with described Transaction Identifier.
CN201110073794.0A 2011-03-25 2011-03-25 Graphic database-based online transaction processing system and data insertion method Active CN102193989B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110073794.0A CN102193989B (en) 2011-03-25 2011-03-25 Graphic database-based online transaction processing system and data insertion method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110073794.0A CN102193989B (en) 2011-03-25 2011-03-25 Graphic database-based online transaction processing system and data insertion method

Publications (2)

Publication Number Publication Date
CN102193989A CN102193989A (en) 2011-09-21
CN102193989B true CN102193989B (en) 2015-07-08

Family

ID=44602059

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110073794.0A Active CN102193989B (en) 2011-03-25 2011-03-25 Graphic database-based online transaction processing system and data insertion method

Country Status (1)

Country Link
CN (1) CN102193989B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105574022B (en) * 2014-10-14 2020-04-17 阿里巴巴集团控股有限公司 Method and device for processing business object based on relational database
CN105786595B (en) * 2016-02-29 2019-04-23 浪潮通用软件有限公司 A kind of transaction control method that two-part is submitted
WO2017173828A1 (en) * 2016-04-06 2017-10-12 Huawei Technologies Co., Ltd. System and method for multi-master synchronous replication optimization

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1507597A (en) * 2001-05-15 2004-06-23 �Ҵ���˾ Method for managing distributed savepoints across multiple DBMS's within a distributed transaction
CN101046821A (en) * 2006-03-31 2007-10-03 Sap股份公司 Generic database manipulator
CN101699439A (en) * 2009-11-16 2010-04-28 中兴通讯股份有限公司 Database transaction submitting method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1507597A (en) * 2001-05-15 2004-06-23 �Ҵ���˾ Method for managing distributed savepoints across multiple DBMS's within a distributed transaction
CN101046821A (en) * 2006-03-31 2007-10-03 Sap股份公司 Generic database manipulator
CN101699439A (en) * 2009-11-16 2010-04-28 中兴通讯股份有限公司 Database transaction submitting method and device

Also Published As

Publication number Publication date
CN102193989A (en) 2011-09-21

Similar Documents

Publication Publication Date Title
JP4301937B2 (en) Read consistently in a distributed database environment
EP0716385B1 (en) Application-specific conflict detection for weakly consistent replicated databases
US8756196B2 (en) Propagating tables while preserving cyclic foreign key relationships
CN102103642B (en) Data-erasure method based on OLTP, system and graphic data base server
CN101268439A (en) Database fragment cloning and management
CN111881223B (en) Data management method, device, system and storage medium
EP2800013B1 (en) Integration database framework
AU2002303900A1 (en) Consistent read in a distributed database environment
CN104216955A (en) Methods and devices for operating data and managing events and distributed system
CN102193991A (en) OLTP(on-line transaction processing)-based data modifying method and system as well as graphic database server
CN102193989B (en) Graphic database-based online transaction processing system and data insertion method
Mullen et al. On the impossibility of atomic commitment in multidatabase systems
CN102193987B (en) Method and system for increasing node data relationship based on OLTP (online transaction processing)
CN112015819A (en) Data updating method, device, equipment and medium for distributed graph database
EP3036637A1 (en) Method and system for automatic management of dynamically allocated memory in a computing unit
CN102193986B (en) Method of implementing online transaction in graphic database
CN102193975B (en) Method for realizing transaction committing mechanism in online transaction of graphic database
CN102193981B (en) Method for realizing transaction expiration mechanism in online transaction of graphic database
CN102193976B (en) Method for implementing transaction rollback mechanism in online transaction of graphic database
Cobbs Persistence Programming: Are we doing this right?
CN112286992B (en) Query method, distributed system, device and storage medium
EP1788496A2 (en) Consistent read in a distributed database environment
Muhlberger Mobile devices as distributed database components for relocating applications
CN102193980B (en) Control method for inserting data into offline transaction of graphic database
CN102193978B (en) Control method of deleting data in offline transaction of pattern database

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
ASS Succession or assignment of patent right

Free format text: FORMER OWNER: BEIJING CLOUDEX SOFTWARE SERVICES CO., LTD.

Effective date: 20120920

Owner name: BEIJING CENTURY BROADBAND INTERNET DATA CENTER CO.

Free format text: FORMER OWNER: BEIJING BANYANO DATA CENTER SOLUTIONS LTD.

Effective date: 20120920

C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20120920

Address after: 100015, No. 5, building 1, 3 East Road, Jiuxianqiao Road, Beijing, Chaoyang District

Applicant after: Beijing Century Broadband Internet Data Center Co., Ltd.

Address before: 100015 No. 3, building 5, building 1, Jiuxianqiao East Road, Chaoyang District, Beijing

Applicant before: Beijing BANYANO Data Center Solutions Ltd.

Applicant before: Beijing CloudEx Software Service Co., Ltd.

C14 Grant of patent or utility model
GR01 Patent grant