CN107145574A - database data processing method, device and storage medium and electronic equipment - Google Patents
database data processing method, device and storage medium and electronic equipment Download PDFInfo
- Publication number
- CN107145574A CN107145574A CN201710313199.7A CN201710313199A CN107145574A CN 107145574 A CN107145574 A CN 107145574A CN 201710313199 A CN201710313199 A CN 201710313199A CN 107145574 A CN107145574 A CN 107145574A
- Authority
- CN
- China
- Prior art keywords
- data
- record object
- tables
- record
- storage device
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
Abstract
The disclosure is directed to a kind of database data processing method, device and storage medium and electronic equipment.This method includes:Predetermined registration operation request is received, responds the predetermined registration operation request to obtain corresponding one first record object from one first tables of data;Wherein, first tables of data includes the first storage device for belonging to every the first record object, and the first storage device is used to preserve the address of one second record object in one second tables of data relevant with the corresponding first record object;The address in the first storage device according to belonging to the described first record object obtains the second record object relevant with the described first record object from second tables of data.The disclosure can save the time that data query is spent, and improve efficiency data query.
Description
Technical field
This disclosure relates at database technical field, more particularly to a kind of database data processing method, database data
Reason device and the computer-readable recording medium and electronic equipment for realizing the database data processing method.
Background technology
At present, it is growing with information data process demand, in some high performance transaction processing systems, often
Using the solution of memory database.Because memory database is without using disk, therefore the I/O times saved for disk open
Pin, so as to significantly increase data storage and query efficiency.Therefore the solution of memory database becomes increasingly to weigh
Will.
In correlation technique, at present in the transaction processing system of traditional use memory database, usual business behaviour
The completion of work needs to access the progress of multiple traffic tables.For example there are three traffic tables TableA, TableB and TableC, be usually first
Corresponding record is found from TableA to be checked or the operation such as update, then finds corresponding record from TableB carries out
Check or the operation such as update, corresponding record is finally found from TableC and is checked or updated etc. operation.So lead
The data in each small step of business procession will go to access all different business tables are caused, and will be from each
Remove to search corresponding record in whole records of traffic table, query context it is excessive so that business procession take it is more and
Inefficiency.This, which is further resulted in, has larger service process performance in the business processing scene higher to delay requirement and asks
Topic, and with each traffic table in transaction processing system record data be significantly increased, service process performance can be further
It is greatly affected.
Therefore, it is necessary to which providing a kind of new technical scheme improves one or more problem present in such scheme.
It should be noted that information is only used for strengthening the reason of background of this disclosure disclosed in above-mentioned background section
Solution, therefore can include not constituting the information to prior art known to persons of ordinary skill in the art.
The content of the invention
The purpose of the disclosure is to provide a kind of database data processing method, database data processing unit and realization
The computer-readable recording medium and electronic equipment of the database data processing method.And then at least overcome to a certain extent by
One or more problem caused by the limitation of correlation technique and defect.
Other characteristics and advantage of the disclosure will be apparent from by following detailed description, or partially by the disclosure
Practice and acquistion.
According to the first aspect of the embodiment of the present disclosure there is provided a kind of database data processing method, methods described includes:
Predetermined registration operation request is received, responds the predetermined registration operation request to obtain corresponding one from one first tables of data
First record object;Wherein, first tables of data includes belonging to one first storage dress of every the first record object
Put, the first storage device is used to preserve in one second tables of data relevant with the corresponding first record object
One second record object address;
The address in the first storage device according to belonging to the described first record object is from second data
The second record object relevant with the described first record object is obtained in table.
In a kind of exemplary embodiment of the disclosure, the database be a memory database, first tables of data and
Second tables of data is the memory table in the memory database.
It is relevant in first tables of data and second tables of data in a kind of exemplary embodiment of the disclosure
Record object between when being man-to-man relation, the first storage device uses pointer;
The address in the first storage device according to belonging to the described first record object is from described second
The second record object relevant with the described first record object is obtained in tables of data to be included:
The address indicated by the pointer according to belonging to the described first record object is from second tables of data
Obtain the second record object relevant with the described first record object.
In a kind of exemplary embodiment of the disclosure, the record object in the first tables of data and the data second table
Between when being one-to-many relation, the first storage device uses associated container;The associated container is for preserving and correspondingly
Relevant second tables of data of the first record object in multiple second records objects address;
The address in the first storage device according to belonging to the described first record object is from described second
The second record object relevant with the described first record object is obtained in tables of data to be included:
Travel through the address of the multiple second record object in the associated container belonging to the first record object
To obtain the multiple second record objects relevant with the described first record object from second tables of data.
In a kind of exemplary embodiment of the disclosure, the associated container includes unique index type container and/or not exclusive
Index type container.
In a kind of exemplary embodiment of the disclosure, every first record object includes multiple institutes in first tables of data
State first storage device.
In a kind of exemplary embodiment of the disclosure, the record object in first tables of data and second tables of data
Between when being the relation of multi-to-multi, second tables of data includes belonging to one second storage dress of every second record object
Put, wherein second storage device is used to preserve in first tables of data relevant with the described second record object
One first record object address;
Methods described also includes:
The address in second storage device according to belonging to the described second record object is from first data
The first record object relevant with the described second record object is obtained in table.
In a kind of exemplary embodiment of the disclosure, second storage device uses pointer or associated container.
According to the second aspect of the embodiment of the present disclosure there is provided a kind of database data processing unit, described device includes:
Data acquisition module, for receiving predetermined registration operation request, responds the predetermined registration operation request to count from one first
Object is recorded according to obtaining corresponding one first in table;Wherein, first tables of data includes belonging to every first record
One first storage device of object, the first storage device, which is used to preserve, and the corresponding first record object is relevant closes
The address of one second record object in one second tables of data of system;
First data search module, for the institute in the first storage device according to belonging to the described first record object
State address and the second record object relevant with the described first record object is obtained from second tables of data.
In a kind of exemplary embodiment of the disclosure, the database be a memory database, first tables of data and
Second tables of data is the memory table in the memory database.
It is relevant in first tables of data and second tables of data in a kind of exemplary embodiment of the disclosure
Record object between when being man-to-man relation, the first storage device uses pointer;
The first data search module, for the institute indicated by the pointer according to belonging to the described first record object
State address and the second record object relevant with the described first record object is obtained from second tables of data.
In a kind of exemplary embodiment of the disclosure, the record object in the first tables of data and the data second table
Between when being one-to-many relation, the first storage device uses associated container;The associated container is for preserving and correspondingly
Relevant second tables of data of the first record object in multiple second records objects address;
The first data search module, for traveling through the institute in the associated container belonging to the first record object
It is relevant with the described first record object to be obtained from second tables of data to state the address of multiple second record objects
It is multiple it is described second record objects.
In a kind of exemplary embodiment of the disclosure, the associated container includes unique index type container and/or not exclusive
Index type container.
In a kind of exemplary embodiment of the disclosure, every first record object includes multiple institutes in first tables of data
State first storage device.
In a kind of exemplary embodiment of the disclosure, the record object in first tables of data and second tables of data
Between when being the relation of multi-to-multi, second tables of data includes belonging to one second storage dress of every second record object
Put, wherein second storage device is used to preserve in first tables of data relevant with the described second record object
One first record object address;
Described device also includes:
Second data search module, for the institute in second storage device according to belonging to the described second record object
State address and the first record object relevant with the described second record object is obtained from first tables of data.
In a kind of exemplary embodiment of the disclosure, second storage device uses pointer or associated container.
According to the third aspect of the embodiment of the present disclosure there is provided a kind of computer-readable recording medium, calculating is stored thereon with
Machine program, the program realizes database data processing method described in any of the above-described embodiment when being executed by processor the step of.
According to the fourth aspect of the embodiment of the present disclosure there is provided a kind of electronic equipment, including:
Processor;And
Memory, the executable instruction for storing the processor;
Wherein, the processor is configured to perform described in any of the above-described embodiment via the executable instruction is performed
The step of database data processing method.
The technical scheme provided by this disclosed embodiment can include the following benefits:
In a kind of embodiment of the disclosure, by above-mentioned database data processing method and processing device, set in a tables of data
Put the record object in record and the tables of data in the first storage device for belonging to every record object, the first storage device
The address of another record object in relevant another tables of data.Thus it is possible, on the one hand, in searching data, Ke Yigen
Data are directly found according to the address recorded in the storage device, without being recorded from the whole in each tables of data in objects one by one
Go to search, greatly save the time that data query is spent, improve search efficiency;On the other hand, data query scope is significantly
Reduce so that corresponding business procession efficiency is improved, can also in the business processing scene higher to delay requirement
Improve service process performance, and with each traffic table in transaction processing system record data be significantly increased, at business
Rationality can also can get a promotion to a certain extent.
It should be appreciated that the general description of the above and detailed description hereinafter are only exemplary and explanatory, not
The disclosure can be limited.
Brief description of the drawings
Accompanying drawing herein is merged in specification and constitutes the part of this specification, shows the implementation for meeting the disclosure
Example, and be used to together with specification to explain the principle of the disclosure.It should be evident that drawings in the following description are only the disclosure
Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis
These accompanying drawings obtain other accompanying drawings.
Fig. 1 schematically shows database data process flow figure in disclosure exemplary embodiment;
Fig. 2 schematically shows the data structure schematic diagram of tables of data in disclosure exemplary embodiment;
Fig. 3 schematically shows the incidence relation schematic diagram between different pieces of information table in disclosure exemplary embodiment;
Fig. 4 schematically shows another database data process flow figure in disclosure exemplary embodiment;
Fig. 5 schematically shows database data processing unit schematic diagram in disclosure exemplary embodiment;
Fig. 6 schematically shows another database data processing unit schematic diagram in disclosure exemplary embodiment;
Fig. 7 schematically shows another database data processing unit schematic diagram in disclosure exemplary embodiment.
Embodiment
Example embodiment is described more fully with referring now to accompanying drawing.However, example embodiment can be with a variety of shapes
Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, thesing embodiments are provided so that the disclosure will more
Fully and completely, and by the design of example embodiment those skilled in the art is comprehensively conveyed to.Described feature, knot
Structure or characteristic can be combined in one or more embodiments in any suitable manner.
In addition, accompanying drawing is only the schematic illustrations of the disclosure, it is not necessarily drawn to scale.Identical accompanying drawing mark in figure
Note represents same or similar part, thus will omit repetition thereof.Some block diagrams shown in accompanying drawing are work(
Can entity, not necessarily must be corresponding with physically or logically independent entity.These work(can be realized using software form
Can entity, or realize in one or more hardware modules or integrated circuit these functional entitys, or at heterogeneous networks and/or place
These functional entitys are realized in reason device device and/or microcontroller device.
A kind of database data processing method is provide firstly in this example embodiment.With reference to shown in Fig. 1, this method
It may comprise steps of:
Step S101:Predetermined registration operation request is received, responds the predetermined registration operation request to obtain from one first tables of data
Take corresponding one first record object;Wherein, first tables of data includes belonging to the one of every the first record object
First storage device, the first storage device is used to preserve one the relevant with the corresponding first record object
The address of one second record object in two tables of data.
Step S102:The address in the first storage device according to belonging to the described first record object is from described
The second record object relevant with the described first record object is obtained in second tables of data.
Pass through above-mentioned database data processing method, on the one hand, in searching data, can be according to the first storage device
The address of middle record directly finds data, without going to search one by one from whole record objects in each tables of data, significantly
The time that data query is spent is saved, search efficiency is improved;On the other hand, data query scope greatly reduce so that
Corresponding business procession efficiency is improved, and business processing can also be improved in the business processing scene higher to delay requirement
Performance, and with each traffic table in transaction processing system record data be significantly increased, service process performance also can be
Get a promotion to a certain extent.
Below, each step of the above method in this example embodiment will be carried out referring to figs. 1 to Fig. 4 more detailed
Explanation.
In step S101, predetermined registration operation request is received, predetermined registration operation request is responded with from one first tables of data
It is middle to obtain corresponding one first record object;Wherein, first tables of data includes belonging to every the first record object
A first storage device, the first storage device be used for preserve and it is corresponding it is described first record object it is relevant
The address of one second record object in one second tables of data.
In this example embodiment, predetermined registration operation request can be data inquiry request, data removal request or
Data update request etc..The database can be a memory database, and first tables of data and second tables of data are equal
For the memory table in the memory database.Memory database is that data are placed on to the database directly operated in internal memory.Relatively
In disk, the reading and writing data speed of internal memory will be several orders of magnitude higher, and saved the data in internal memory and compared the access from disk
The performance of application can be greatly enhanced.In addition, memory database is object type, maintenance costs are small.This example embodiment
In show the first tables of data and the second tables of data, but this number for being not used to limit the tables of data in this example embodiment
Measure, every record object in the tables of data of any two or more in each tables of data can set storage device to preserve
The address of record object in another tables of data of associated relation, so as to reduce data query scope, is directly looked into
Data are looked for reduce time-consuming.This example embodiment will be further described by taking three tables of data as an example below.
Exemplary, in the application scenarios such as transaction system, first tables of data can be as shown in table 1
Customer table, second tables of data can be credit as shown in table 2.It can also include in the application scenarios as shown in table 3
The 3rd tables of data, that is, table of holding position.Other clients such as customer table storage customer number such as ID, client state and customer name
Information.Credit is used for storing corresponding accounts information, and a client can have multiple accounts, such as do spot exchange stock in hand
The account of transaction, doing futures exchange has the account of futures exchange, while each account also has corresponding trading privilege.Table of holding position is used
To store, client is corresponding under specific account to hold position.
Table 1
Customer number | Customer status | Name | Address | Mobile phone |
000001 | Arm's length dealing | Zhang San | Zhejiang Hangzhou | 12345678911 |
000002 | Freeze | Li Si | Zhejiang Jiaxing | 12345678912 |
… | … | … | … | … |
100000 | Cancellation | King five | Hubei Wuhan | 12345678913 |
Table 2
Customer number | Trading account | Account Type | Account authority | Account status |
000001 | A00000101 | From stock | Allow dealing | Normally |
000001 | A00000102 | Futures | It can only buy | Normally |
000002 | A00000201 | From stock | Allow dealing | It is abnormal |
000002 | A00000202 | Futures | It can only sell | Normally |
… | … | … | … | … |
100000 | A10000001 | From stock | Allow dealing | Normally |
100000 | A10000002 | Futures | It can only buy | Normally |
Table 3
This example embodiment is the relation according to entity in service application scene the note in some isolated tables of data
Record object is mutually organized, and the respiratory sensation relation of the superior and the subordinate is formed, so as to during operation flow is implemented, find
Address search is obtained in the first storage device that rapidly can record object from higher level after higher level's record object to higher level to remember
Record subordinate's record object of object association.Illustrate the specific mistake that above-mentioned incidence relation namely the first storage device are set up below
Journey.
In one exemplary embodiment, record pair relevant in first tables of data and second tables of data
When being man-to-man relation as between, the first storage device uses pointer.And in a further exemplary embodiment, described
When being one-to-many relation between the record object in one tables of data and the table of the data second, the first storage device is used
Associated container.The associated container is used to preserve second data relevant with the corresponding first record object
The address of multiple second record objects in table.The process of setting up to the first storage device is explained in detail below.
With reference to shown in Fig. 2~3, it is necessary first to sort out all entities for needing to use in business procession, that is,
Corresponding memory table, for example above the illustrate customer table listed, credit and table of holding position.Then the pass between these entities is combed
System, and design incidence relation.Such as one client may have multiple accounts (more than 1), can design customer table and account
Table is one-to-many relation.If a client only has 1 even without account certainly, the relation of the two tables of data is just
It is man-to-man relation.
In the present exemplary embodiment, only when being man-to-man relation between record object all in Tables 1 and 2
When, the relation between two forms is only one-to-one.If being one-to-one between the record object having between Tables 1 and 2, have
It is one-to-many between record object, then the relation between two forms is one-to-many, such as above-mentioned customer table enumerated and account
Table.Further, since can have again below an account it is multiple hold position, then credit and table of holding position are also one-to-many relation.
Next can be with the structure of design data sheet, in the present exemplary embodiment based on memory database, therefore
It is exactly to design corresponding structure or class in fact during design data sheet.Therefore can be according to customer table Client and credit
Account association attributes designs corresponding structure C lientClass and AccountClass.
The incidence relation of relation between design data sheet, such as customer table Client and credit Account.Due to
It is one-to-many relation to comb out between customer table and credit, then can customer table Client structure C lientClass
The inside increases a container, and this container is used to store all credits relevant with existing customer table Client
All accounts under the address of record object in Account, that is, some current client of storage.
Exemplary, ClientClass and AccountClass structure designs can be as follows:
Record one associated container of correspondence in the present exemplary embodiment in a tables of data, rather than a data
Table is with an associated container with the content in real-time update associated container, and such access speed is more much faster than real-time change,
Because the content that need not be gone according to the content currently to be searched in real-time update associated container.
If it should be noted that the customer table Client and credit Account are logically simply man-to-man
Relation, such as one client only has an account, and a finger is at this time only needed on Client structure C lientClass
Pointer into AccountClass, without being associated container.When being man-to-man relation between two tables of data, it can adopt
Use a variable to store the address of the record in associated tables of data i.e. with every record in pointer, i.e. memory table
Can, so stored compared with associated container, lacked once traversal or the operation of Query Result is returned by ordering rule, searched
Speed faster, further reduces time-consuming raising efficiency.
Incidence relation between each data list structure can be established successively according to above-mentioned principle.So far, institute is relevant
Relational design is completed.Relation when program starts further according to design initializes the relation between actual object.
Customer number is 000001 in record and credit that customer number in such as customer table is 000001 and trading account is
A00000101 and A00000102 two record opening relationships, that is, the address of this two records is inserted into customer table
In associated container of the customer number for 000001 user logging.It is first to be found from customer table when during processing business
Customer number is 000001 client, when then searching some account under the client, and just only needing to should from customer table
That corresponding account is found in the associated container of the trading account associated in the corresponding storage credit of user logging,
Without going searching data one by one from the total data in credit, save the time and improve search efficiency.
The associated container refers to a complicated storage device, and it typically has will store according to default ordering rule
Content carry out storage in the function of auto-sequencing, such as associated container of the customer number 000001 in customer table and point to account
The pointer of trading account A00000101 and A00000102 in table, then sequence rule will be defined in credit in advance
Then, for example it is ranked up according to fund size or time order and function etc., similar to the index work(in relevant database
Can, be conducive to quickly navigating to the trading account to be searched.But ordering rule is not essential, can also there is no ordering rule,
It is exactly to travel through whole associated container so when searching, locating speed is slightly slower, but it is also possible to compare to a certain extent
Correlation technique improves search efficiency.
In step s 102, according to described first record object belonging to the first storage device in the address from
The second record object relevant with the described first record object is obtained in second tables of data.
It is exemplary, when being between record object relevant in first tables of data and second tables of data
During man-to-man relation, the first storage device uses pointer.Accordingly, it is described according to belonging to the described first record object
The address in the first storage device obtains close relevant with the described first record object from second tables of data
The second record object, i.e. the step S102 of system can include:
Step 1021:The address indicated by the pointer according to belonging to the described first record object is from described second
The second record object relevant with the described first record object is obtained in tables of data.
For example, according to a data inquiry request for carrying customer number, from customer table finding customer number is
000001 client, when then searching some account under the client, just only needs to the user logging pair from customer table
Address indicated by the pointer of the address of the trading account associated in the storage credit answered is found pair from credit
The account answered, such as account A00000101 or A00000102.
It is exemplary, when being one-to-many pass between the record object in first tables of data and the table of the data second
When being, the first storage device uses associated container.The associated container is used to preserve and corresponding first record pair
As the address of multiple second record objects in relevant second tables of data.Accordingly, it is described according to described
The address in the first storage device belonging to one record object is obtained and described first from second tables of data
Record object relevant the second record object, i.e. the step S102 can include:
Step 1022:Travel through the multiple second record pair in the associated container belonging to the first record object
Remembered with obtaining multiple described second relevant with the described first record object from second tables of data address of elephant
Record object.
For example, according to a data inquiry request for carrying customer number, from customer table finding customer number is
000001 client, when then searching some account under the client, just only needs to according to the user logging of this in customer table
The address preserved in the associated container of the address of the trading account associated in the corresponding storage credit is from the account
Corresponding account, such as account A00000101 and A00000102 are found in table.It can for example be handed over again according in the credit
Easy account is by multiple addresses for being preserved in each self-corresponding associated container of A00000101 and A00000102 from the table of holding position
In find each self-corresponding 5 records of holding position, specifically refer to shown in Fig. 3.
In a kind of exemplary embodiment of the disclosure, every first record object can also be wrapped in first tables of data
Include multiple first storage devices.It is association all referring to pin or entirely that the plurality of first storage device, which can be,
Container, or part is pointer and remainder is associated container.
In one exemplary embodiment, the associated container can include unique index type container and/or non-only indexes
Type container.I.e. multiple associated containers can be individually unique index type container or non-only indexes type container, can also
It is while including unique index type container and non-only indexes type container.The effect of index is to arrange order so that during inquiry
Data can be quickly found out.Field combination its data that unique index refers to being indexed are unique in full table.It is as follows, be
Student number is indexed, and it is unique, i.e., without repetition identical student number.
Non-only indexes refer to that data can not be unique.
It is as follows, be that Score is indexed, it is not unique, as 98 be repeat.
The client that the associated container type is included in unique index and non-only indexes two types, such as customer table compiles
It is A00000101 and A00000102 that number 000001 corresponding Account Type stock and futures, which distinguish corresponding trading account, that is, is handed over
Easy account is not unique.And there is another service application scene, such as include security and futures, the client under one Account Type
Disposably placed an order in different markets (securities market and forward market), set up a task, if then searched according to task number,
In the case of task number identical, it is futures and security that its is corresponding, i.e., not exclusive.Therefore, because business has different dimensions
Degree, can set multiple associated containers, each pass according to different dimensions in the same record of a memory table
Join a kind of ordering rule of container correspondence, for example, every record in customer table can include the associated container of unique index simultaneously
With the associated container of non-only indexes, the different purpose for realizing, the associated container of such as unique index can be used for obtaining
The lookup result (finding out corresponding unique consequence) of subdivision, and the associated container of non-only indexes can be in order to count or
The purpose of traversal, and the purpose that non-sub-divided is searched.
Given in aforementioned embodiments and one-to-many and man-to-man situation between object is recorded in different pieces of information table, but it is actual
In there is likely to be record object between multi-to-multi situation.In the case of multi-to-multi, two data in this example embodiment
There can be forward and reverse transmission function between table, i.e., be to there is in superset tables of data an associated container to be used for recording pass when one-to-many
The content of the subset of connection, but also have an associated container can be for record association in the case of multi-to-multi, in subset data table
Superset tables of data content.
In a kind of exemplary embodiment of the disclosure, the record pair in first tables of data and second tables of data
When being the relation of multi-to-multi as between, second tables of data, which can include belonging to the one second of every second record object, deposit
Storage device, wherein second storage device is used to preserve first data relevant with the described second record object
The address of one first record object in table.Exemplary, second storage device uses pointer or associated container.This
Two storage devices are identical with the first storage device, specifically refer to the explanation previously with regard to first storage device, herein not
Repeat again.
With reference to shown in Fig. 4, accordingly, when being between the record object in first tables of data and second tables of data
During the relation of multi-to-multi, methods described can also comprise the following steps:
Step S103:The address in second storage device according to belonging to the described second record object is from described
The first record object relevant with the described second record object is obtained in first tables of data.Step S103 with it is upper
State same or like according to the process of first storage device searching data in the second tables of data, here is omitted.
Below in conjunction with the technological merit of the above method in specific example comparative descriptions this example embodiment.It is false
If the transaction system current one has 100,000 clients, each client, which has under 2 accounts, each account, has 5 to hold position.This
In sample customer table it is recorded as 100,000, credit is recorded as 200,000, and 1,000,000 are recorded as in table of holding position.It is existing
Transaction process flow is as shown in following 201~204:
201:Transaction request is assigned.
202:According to customer number incoming in request, corresponding client is found in 100,000 records of customer table, so
After examine the customer status whether normal, normally then by continuing down into 203.
203:Correspondence is found from 200,000 records of credit according to customer number and type of transaction incoming in request
Trading account record, then the trading account state is checked, check pass through then continue, down into 204, otherwise to return
Return wrong responses, Fail Transaction.
204:The trading account number and the incoming goods number to be sold of request found according to customer number and previous step
Find corresponding commodity in 1,000,000 of table of holding position records, then the commodity data verified, if quantity more than etc.
In the quantity to be sold then by continuing down to merchandise successfully, request processing terminates.
It can be seen that when a request is come in, each small step of business procession will from flow above
Go to access the data in different tables of data, and will go to search corresponding record from whole records of these tables of data.
There is a very big defect in this mode, a business, which is done, to be got off to need to access three tables, is from the complete of tables of data every time
Go to search that corresponding record in portion's record.For example go to find corresponding client's note from the customer tables of 100,000 records before this
Record, then go the credit of 200,000 records to go for the account of this client, then the table of holding position again from 1,000,000 records goes to find
That that to be sold is held position.So the scene higher to delay requirement can have larger performance issue.Also, with tables of data
Data increase, and the performance of this business can be influenceed by very big, such as increase 200,000 clients, account by 100,000 present clients
Table may increase 400,000, and table of holding position may increase 2,000,000, add after new client, to other original visitors
The performance of transaction at family can all produce influence, because the record of whole tables of data is increased, that is, the scope inquired about is expanded.
It is for example following using the transaction process flow after the above method in this example embodiment with reference to shown in reference to Fig. 3
Shown in 301~304:
301:Transaction request is assigned.
302:According to customer number incoming in request, corresponding client's note is found in 100,000 records of customer table
Whether record, then examine the customer status normal, normally then continue down into 303, otherwise returns to wrong responses, and transaction is lost
Lose.
303:According to the 2 trading accounts record for asking incoming type of transaction to be included from the corresponding user logging found
Associated container in find corresponding trading account record, then the trading account state is checked, checks and passes through then
Continue down into 304, otherwise return to wrong responses, Fail Transaction.
304:According to the association for asking the incoming goods number to be sold to record 5 records of holding position included in trading account
Corresponding inventory records are found in container.Then commodity data is verified, if quantity is more than or equal to the quantity to be sold
Then by continuing down to merchandise successfully, request processing terminates;Otherwise wrong responses, Fail Transaction are returned.
Associated container is set to record the level incidence relation between object, its business in tables of data in this example embodiment
Customer table of the processing procedure before this from 100,000 records is gone to find corresponding user logging, and account is included inside according to user logging
When removing to search Account History in the container of family record, only 2 records among container, the condition of lookup also only needs to type of service
;Also according to the container comprising record of holding position inside Account History go lookup hold position record when, only 5 notes among container
Record, the condition of lookup is also only needed to according to commodity code.Such as 200,000 clients, account are increased by 100,000 present clients
Family table may increase 400,000, and table of holding position may increase 2,000,000, add after new client, to it is original other
When the influence very little, only client's table search that the performance of transaction of client is produced data quantitative change is big, behind receptacle
Data volume is all constant.So allow during data request processing and more efficiently to find next needs using associated container
The data used, compared to prior art so that greatling save total consumption of whole business processing in a request processing procedure
When, improve operation system process performance.
It should be noted that although each step of method in the disclosure is described with particular order in the accompanying drawings,
This does not require that or implied must perform these steps according to the particular order, or have to carry out the step shown in whole
Desired result could be realized.It is additional or alternative, it is convenient to omit some steps, multiple steps are merged into a step and held
OK, and/or by a step execution of multiple steps etc. are decomposed into.In addition, being also easy to understand, these steps can be
For example either synchronously or asynchronously performed in multiple module/process/threads.
Further, in this example embodiment, a kind of database data processing unit is additionally provided.With reference to institute in Fig. 5
Show, device 100 can include the data search module 102 of data acquisition module 101 and first.Wherein:
The data acquisition module 101, for receiving predetermined registration operation request, responds predetermined registration operation request with from one
Corresponding one first record object is obtained in first tables of data;Wherein, first tables of data includes belonging to every described the
One first storage device of one record object, the first storage device is used to preserve and the corresponding first record object has
The address of one second record object in one second tables of data of incidence relation.
The first data search module 102, for the first storage dress according to belonging to the described first record object
The address put obtains second note relevant with the described first record object from second tables of data
Record object.
In a kind of exemplary embodiment of the disclosure, the database is a memory database, first tables of data
It is the memory table in the memory database with second tables of data.
It is relevant in first tables of data and second tables of data to close in a kind of exemplary embodiment of the disclosure
When being man-to-man relation between the record object of system, the first storage device uses pointer.Accordingly, first data
Searching modul 102, for the address indicated by the pointer according to belonging to the described first record object from described second
The second record object relevant with the described first record object is obtained in tables of data.
In a kind of exemplary embodiment of the disclosure, the record pair in the first tables of data and the data second table
When being one-to-many relation as between, the first storage device uses associated container;The associated container is used to preserve and right
Described first answered records the address of multiple second records objects in relevant second tables of data of object.Accordingly
, the first data search module 102, described in traveling through in the associated container belonging to the first record object
The address of multiple second record objects is relevant with the described first record object to be obtained from second tables of data
Multiple second record objects.
In a kind of exemplary embodiment of the disclosure, the associated container can include unique index type container and/or
Non-only indexes type container.In a kind of exemplary embodiment of the disclosure, every first record pair in first tables of data
As multiple first storage devices can be included.
With reference to shown in Fig. 6, in a kind of exemplary embodiment of the disclosure, first tables of data and second number
During according to being the relation of multi-to-multi between the record object in table, second tables of data can also include belonging to every second note
One second storage device of object is recorded, wherein second storage device is used to preserve close relevant with the described second record object
The address of one first record object in first tables of data of system.Described device 100 can also include the second data search
Module 103, for the address in second storage device according to belonging to the described second record object from described first
The first record object relevant with the described second record object is obtained in tables of data.
In a kind of exemplary embodiment of the disclosure, second storage device can be held using pointer or association
Device.
On the device in above-described embodiment, wherein modules perform the concrete mode of operation in relevant this method
Embodiment in be described in detail, explanation will be not set forth in detail herein.
Although it should be noted that being referred to some modules or list of the equipment for action executing in above-detailed
Member, but this division is not enforceable.In fact, according to embodiment of the present disclosure, it is above-described two or more
Module or the feature and function of unit can embody in a module or unit.Conversely, an above-described mould
The feature and function of block or unit can be further divided into being embodied by multiple modules or unit.It is used as module or list
The part of member display can be or may not be physical location, you can with positioned at a place, or can also be distributed to
On multiple NEs.Some or all of module therein can be selected according to the actual needs to realize the open scheme of wood
Purpose.Those of ordinary skill in the art are without creative efforts, you can to understand and implement.
In this example embodiment, a kind of computer-readable recording medium is additionally provided, computer program is stored thereon with,
The program realizes database data processing method described in any of the above-described embodiment when being executed by processor the step of.On the number
The detailed description in preceding method embodiment is referred to according to the specific steps of storehouse data processing method, here is omitted.
In addition, in this example embodiment, additionally provide a kind of electronic equipment, the electronic equipment can include processor and
Memory.Wherein, the memory, the executable instruction for storing the processor;The processor is configured to via holding
The step of row executable instruction is to perform database data processing method described in any of the above-described embodiment.On the data
The specific steps of storehouse data processing method refer to the detailed description in preceding method embodiment, and here is omitted.
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented
Mode can be realized by software, can also be realized by way of software combines necessary hardware.Therefore, according to the disclosure
The technical scheme of embodiment can be embodied in the form of software product, the software product can be stored in one it is non-volatile
Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are to cause a calculating
Equipment (can be personal computer, server, touch control terminal or network equipment etc.) is performed according to disclosure embodiment
Method.
Fig. 7 is shown according to a kind of schematic diagram of database data processing unit 400 in disclosure example embodiment.Example
Such as, device 400 may be provided in a server.Reference picture 7, device 400 includes processing assembly 422, and it further comprises one
Individual or multiple processors, and as the memory resource representated by memory 432, can holding by processing assembly 422 for storing
Capable instruction, such as application program.The application program stored in memory 432 can include it is one or more each
Corresponding to the module of one group of instruction.In addition, processing assembly 422 is configured as execute instruction, to perform the above method.
Device 400 can also include the power management that a power supply module 426 is configured as performs device 400, and one has
Line or radio network interface 450 are configured as device 400 being connected to network, and input and output (I/O) interface 458.Dress
Putting 400 can operate based on the operating system for being stored in memory 432, such as Windows ServerTM, Mac OS XTM,
UnixTM, LinuxTM, FreeBSDTM or similar.
Those skilled in the art will readily occur to its of the disclosure after considering specification and putting into practice invention disclosed herein
Its embodiment.The application is intended to any modification, purposes or the adaptations of the disclosure, these modifications, purposes or
Person's adaptations follow the general principle of the disclosure and including the undocumented common knowledge in the art of the disclosure
Or conventional techniques.Description and embodiments are considered only as exemplary, and the true scope of the disclosure and spirit are by appended
Claim is pointed out.
Claims (18)
1. a kind of database data processing method, it is characterised in that methods described includes:
Predetermined registration operation request is received, responds the predetermined registration operation request to obtain corresponding one first from one first tables of data
Record object;Wherein, first tables of data includes the first storage device for belonging to every the first record object, institute
State first storage device be used for preserve and corresponding described first record in relevant one second tables of data of object one
The address of second record object;
The address in the first storage device according to belonging to the described first record object is from second tables of data
Obtain the second record object relevant with the described first record object.
2. method according to claim 1, it is characterised in that the database is a memory database, first data
Table and second tables of data are the memory table in the memory database.
3. method according to claim 2, it is characterised in that relevant in first tables of data and second tables of data
When being man-to-man relation between the record object of relation, the first storage device uses pointer;
The address in the first storage device according to belonging to the described first record object is from second data
The second record object relevant with the described first record object is obtained in table to be included:
The address indicated by the pointer according to belonging to the described first record object is obtained from second tables of data
The second record object relevant with the described first record object.
4. method according to claim 2, it is characterised in that the record in the first tables of data and the data second table
When being one-to-many relation between object, the first storage device uses associated container;The associated container be used for preserve and
The address of multiple second record objects in relevant second tables of data of the corresponding first record object;
The address in the first storage device according to belonging to the described first record object is from second data
The second record object relevant with the described first record object is obtained in table to be included:
Travel through it is described first record object belonging to the associated container in it is the multiple second record object address with from
The multiple second record objects relevant with the described first record object are obtained in second tables of data.
5. method according to claim 4, it is characterised in that the associated container includes unique index type container and/or non-
Unique index type container.
6. method according to claim 1 or claim 2, it is characterised in that every first record object bag in first tables of data
Include multiple first storage devices.
7. method according to claim 2, it is characterised in that the record in first tables of data and second tables of data
When being the relation of multi-to-multi between object, second tables of data includes belonging to one second storage of every second record object
Device, wherein second storage device is used to preserve first tables of data relevant with the described second record object
In one first record object address;
Methods described also includes:
The address in second storage device according to belonging to the described second record object is from first tables of data
Obtain the first record object relevant with the described second record object.
8. method according to claim 7, it is characterised in that second storage device uses pointer or associated container.
9. a kind of database data processing unit, it is characterised in that described device includes:
Data acquisition module, for receiving predetermined registration operation request, responds predetermined registration operation request with from one first tables of data
It is middle to obtain corresponding one first record object;Wherein, first tables of data includes belonging to every the first record object
A first storage device, the first storage device be used for preserve and it is corresponding it is described first record object it is relevant
The address of one second record object in one second tables of data;
First data search module, for described in the first storage device according to belonging to the described first record object
Location obtains the second record object relevant with the described first record object from second tables of data.
10. device according to claim 9, it is characterised in that the database is a memory database, first data
Table and second tables of data are the memory table in the memory database.
11. device according to claim 10, it is characterised in that relevant in first tables of data and second tables of data
When being man-to-man relation between the record object of connection relation, the first storage device uses pointer;
The first data search module, for described indicated by the pointer according to belonging to the described first record object
Location obtains the second record object relevant with the described first record object from second tables of data.
12. device according to claim 10, it is characterised in that the note in the first tables of data and the data second table
When being one-to-many relation between record object, the first storage device uses associated container;The associated container is used to preserve
The address of multiple second record objects with the corresponding first record object in relevant second tables of data;
The first data search module is described more in the associated container belonging to the first record object for traveling through
The address of individual second record object records relevant many of object to be obtained from second tables of data with described first
The individual second record object.
13. according to claim 12 described device, it is characterised in that the associated container include unique index type container and/or
Non-only indexes type container.
14. according to the described device of claim 9 or 10, it is characterised in that every first record object in first tables of data
Including multiple first storage devices.
15. device according to claim 10, it is characterised in that the note in first tables of data and second tables of data
When being the relation of multi-to-multi between record object, second tables of data is deposited including belonging to the one second of every second record object
Storage device, wherein second storage device is used to preserve first data relevant with the described second record object
The address of one first record object in table;
Described device also includes:
Second data search module, for described in second storage device according to belonging to the described second record object
Location obtains the first record object relevant with the described second record object from first tables of data.
16. according to claim 15 described device, it is characterised in that second storage device is held using pointer or association
Device.
17. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the program is by processor
The step of any one of the claim 1~8 database data processing method is realized during execution.
18. a kind of electronic equipment, it is characterised in that including:
Processor;And
Memory, the executable instruction for storing the processor;
Wherein, the processor is configured to carry out any one of perform claim requirement 1~8 number via the execution executable instruction
The step of according to storehouse data processing method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710313199.7A CN107145574A (en) | 2017-05-05 | 2017-05-05 | database data processing method, device and storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710313199.7A CN107145574A (en) | 2017-05-05 | 2017-05-05 | database data processing method, device and storage medium and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107145574A true CN107145574A (en) | 2017-09-08 |
Family
ID=59777911
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710313199.7A Pending CN107145574A (en) | 2017-05-05 | 2017-05-05 | database data processing method, device and storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107145574A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108932313A (en) * | 2018-06-20 | 2018-12-04 | 斑马网络技术有限公司 | Data processing method, device, electronic equipment and storage medium |
CN109101634A (en) * | 2018-08-15 | 2018-12-28 | 北京三快在线科技有限公司 | Data record processing method, device, electronic equipment and storage medium |
CN109471840A (en) * | 2018-10-15 | 2019-03-15 | 北京海数宝科技有限公司 | Fileview method, apparatus, computer equipment and storage medium |
CN110196889A (en) * | 2019-05-30 | 2019-09-03 | 北京字节跳动网络技术有限公司 | Data processing method, device, electronic equipment and storage medium |
CN112131215A (en) * | 2019-06-25 | 2020-12-25 | 中国移动通信集团重庆有限公司 | Bottom-up database information acquisition method and device |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101770479A (en) * | 2008-12-31 | 2010-07-07 | 北京亿阳信通软件研究院有限公司 | Association relationship query method and device |
CN102195781A (en) * | 2011-05-30 | 2011-09-21 | 武汉理工大学 | Electronic evidence obtaining system based on electronic record correlated signature |
CN102467507A (en) * | 2010-11-03 | 2012-05-23 | 康佳集团股份有限公司 | Method for quickly searching for diary and mobile terminal |
CN102467525A (en) * | 2010-11-10 | 2012-05-23 | 金蝶软件(中国)有限公司 | Document associating method and system |
CN102624698A (en) * | 2012-01-17 | 2012-08-01 | 武汉理工大学 | Evidence management and service system for electronic records |
CN103678314A (en) * | 2012-09-03 | 2014-03-26 | 中国银联股份有限公司 | Mass data processing system, equipment and method based on association rule extraction |
CN103984640A (en) * | 2014-05-14 | 2014-08-13 | 华为技术有限公司 | Method and device for realizing data prefetching |
CN105354149A (en) * | 2015-11-26 | 2016-02-24 | 深圳市金证科技股份有限公司 | Memory data search method and apparatus |
-
2017
- 2017-05-05 CN CN201710313199.7A patent/CN107145574A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101770479A (en) * | 2008-12-31 | 2010-07-07 | 北京亿阳信通软件研究院有限公司 | Association relationship query method and device |
CN102467507A (en) * | 2010-11-03 | 2012-05-23 | 康佳集团股份有限公司 | Method for quickly searching for diary and mobile terminal |
CN102467525A (en) * | 2010-11-10 | 2012-05-23 | 金蝶软件(中国)有限公司 | Document associating method and system |
CN102195781A (en) * | 2011-05-30 | 2011-09-21 | 武汉理工大学 | Electronic evidence obtaining system based on electronic record correlated signature |
CN102624698A (en) * | 2012-01-17 | 2012-08-01 | 武汉理工大学 | Evidence management and service system for electronic records |
CN103678314A (en) * | 2012-09-03 | 2014-03-26 | 中国银联股份有限公司 | Mass data processing system, equipment and method based on association rule extraction |
CN103984640A (en) * | 2014-05-14 | 2014-08-13 | 华为技术有限公司 | Method and device for realizing data prefetching |
CN105354149A (en) * | 2015-11-26 | 2016-02-24 | 深圳市金证科技股份有限公司 | Memory data search method and apparatus |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108932313A (en) * | 2018-06-20 | 2018-12-04 | 斑马网络技术有限公司 | Data processing method, device, electronic equipment and storage medium |
CN108932313B (en) * | 2018-06-20 | 2021-06-04 | 斑马网络技术有限公司 | Data processing method and device, electronic equipment and storage medium |
CN109101634A (en) * | 2018-08-15 | 2018-12-28 | 北京三快在线科技有限公司 | Data record processing method, device, electronic equipment and storage medium |
CN109101634B (en) * | 2018-08-15 | 2021-06-11 | 北京三快在线科技有限公司 | Data recording processing method, device, electronic equipment and storage medium |
CN109471840A (en) * | 2018-10-15 | 2019-03-15 | 北京海数宝科技有限公司 | Fileview method, apparatus, computer equipment and storage medium |
CN109471840B (en) * | 2018-10-15 | 2021-10-26 | 北京海数宝科技有限公司 | File viewing method and device, computer equipment and storage medium |
CN110196889A (en) * | 2019-05-30 | 2019-09-03 | 北京字节跳动网络技术有限公司 | Data processing method, device, electronic equipment and storage medium |
CN112131215A (en) * | 2019-06-25 | 2020-12-25 | 中国移动通信集团重庆有限公司 | Bottom-up database information acquisition method and device |
CN112131215B (en) * | 2019-06-25 | 2023-09-19 | 中国移动通信集团重庆有限公司 | Bottom-up database information acquisition method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20230275817A1 (en) | Parallel computational framework and application server for determining path connectivity | |
CN107145574A (en) | database data processing method, device and storage medium and electronic equipment | |
US10887177B2 (en) | Calculating trust scores based on social graph statistics | |
CN103748579B (en) | Data are handled in MapReduce frame | |
CN104685498B (en) | The hardware implementation mode of polymerization/division operation:Hash table method | |
CN109299334B (en) | Data processing method and device of knowledge graph | |
CN102831122B (en) | Data storage method, inquiring method and inquiring device for workflow table | |
MX2012003721A (en) | Systems and methods for social graph data analytics to determine connectivity within a community. | |
US20070142925A1 (en) | Bundling database | |
US11442694B1 (en) | Merging database tables by classifying comparison signatures | |
CN107798038A (en) | Data response method and data response apparatus | |
CN109299164A (en) | A kind of data query method, computer readable storage medium and terminal device | |
CN101566986A (en) | Method and device for processing data in online business processing | |
WO2011134086A1 (en) | Systems and methods for conducting reliable assessments with connectivity information | |
CN105117442B (en) | A kind of big data querying method based on probability | |
CN109300036A (en) | The bifurcated homing method and device of block chain network | |
CN107784070A (en) | A kind of method, apparatus and equipment for improving data cleansing efficiency | |
CN106997557A (en) | Sequence information acquisition method and device | |
CN107133289A (en) | A kind of method and apparatus of determination commercial circle | |
CN107577787A (en) | The method and system of associated data information storage | |
CN106326243A (en) | Data processing method and apparatus | |
US20220229814A1 (en) | Maintaining stable record identifiers in the presence of updated data records | |
US11550792B2 (en) | Systems and methods for joining datasets | |
US20230153286A1 (en) | Method and system for hybrid query based on cloud analysis scene, and storage medium | |
CN113127741A (en) | Cache method for reading and writing data of mass users and posts in part-time post recommendation system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170908 |