[go: up one dir, main page]

CN107436918A - Database implementation method, device and equipment - Google Patents

Database implementation method, device and equipment Download PDF

Info

Publication number
CN107436918A
CN107436918A CN201710465882.2A CN201710465882A CN107436918A CN 107436918 A CN107436918 A CN 107436918A CN 201710465882 A CN201710465882 A CN 201710465882A CN 107436918 A CN107436918 A CN 107436918A
Authority
CN
China
Prior art keywords
train value
merging
train
value
tables
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.)
Granted
Application number
CN201710465882.2A
Other languages
Chinese (zh)
Other versions
CN107436918B (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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201710465882.2A priority Critical patent/CN107436918B/en
Publication of CN107436918A publication Critical patent/CN107436918A/en
Application granted granted Critical
Publication of CN107436918B publication Critical patent/CN107436918B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof

Landscapes

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

Abstract

The application provides a kind of database implementation method, device and equipment.Methods described includes:Determine original row to be combined;For each record of tables of data, the train value of the original row to be combined is merged into processing according to rule is merged, obtains merging train value;Corresponding insertion merges train value in the merging row of the tables of data.The application is when disposing database, for each record of tables of data, the train value of original row to be combined can be merged into processing according to rule is merged, obtain merging train value, and corresponding insertion merges train value in the merging row of the tables of data, reduces the number of columns of tables of data, and then reduce the number of columns of the main table of system, reduce read-write when accessing database first to key message to take, improve the speed accessed first, while the occupancy to internal memory can also be reduced.

Description

Database implementation method, device and equipment
Technical field
The application is related to database technical field, more particularly to a kind of database implementation method, device and equipment.
Background technology
Database is to come tissue, storage and the warehouse for managing data according to data structure.When accessing database first, lead to Some key messages of database can be often read in internal memory, and carry out a series of initialization operation, it is follow-up to realize It is normal to access.How speed that database first access is improved, and reduces EMS memory occupation to turn into urgent problem to be solved.
The content of the invention
In view of this, the application provides a kind of database implementation method, device and equipment.
Specifically, the application is achieved by the following technical solution:
A kind of database implementation method, including:
Determine original row to be combined;
For each record of tables of data, the train value of the original row to be combined is merged according to rule is merged Processing, obtain merging train value;
Corresponding insertion merges train value in the merging row of the tables of data.
A kind of database implementation method, including:
Train value is read from the tables of data of database;
Judge whether the train value that reads is merging train value after multiple original train values merge;
If the train value read obtains target train value to merge train value, according to regular reverse resolution is merged.
A kind of database realizing device, including:
Row determining unit, determine original row to be combined;
Train value combining unit, it is regular by the original row to be combined according to merging for each record of tables of data Train value merge processing, obtain merge train value;
Train value inserts unit, the corresponding insertion merging train value in the merging row of the tables of data.
A kind of database realizing device, including:
Train value reading unit, train value is read from the tables of data of database;
Merge judging unit, whether the train value for judging to read is merging train value after multiple original train values merge;
Train value resolution unit, if the train value read obtains target to merge train value, according to regular reverse resolution is merged Train value.
A kind of database realizing equipment, including:
Processor;
For storing the memory of machine-executable instruction;
Wherein, can by reading and performing the machine corresponding with the control logic of database realizing of the memory storage Execute instruction, the processor are prompted to:
Determine original row to be combined;
For each record of tables of data, the train value of the original row to be combined is merged according to rule is merged Processing, obtain merging train value;
Corresponding insertion merges train value in the merging row of the tables of data.
A kind of database realizing equipment, including:
Processor;
For storing the memory of machine-executable instruction;
Wherein, can by reading and performing the machine corresponding with the control logic of database realizing of the memory storage Execute instruction, the processor are prompted to:
Train value is read from the tables of data of database;
Judge whether the train value that reads is merging train value after multiple original train values merge;
If the train value read obtains target train value to merge train value, according to regular reverse resolution is merged.
The application is when disposing database it can be seen from above description, for each record of tables of data, Ke Yigen The train value of original row to be combined is merged into processing according to rule is merged, obtains merging train value, and in the merging of the tables of data Corresponding insertion merges train value in row, reduces the number of columns of tables of data, and then reduces the number of columns of the main table of system, and reduction is visited first Ask that read-write during database to key message takes, improve the speed accessed first, while the occupancy to internal memory can also be reduced.
Brief description of the drawings
Fig. 1 is a kind of schematic flow sheet of database implementation method shown in the exemplary embodiment of the application one.
Fig. 2 is the schematic flow sheet of another database implementation method shown in the exemplary embodiment of the application one.
Fig. 3 is a kind of structural representation for database realizing device shown in the exemplary embodiment of the application one.
Fig. 4 is a kind of block diagram of database realizing device shown in the exemplary embodiment of the application one.
Fig. 5 is a structural representation of the another kind shown in the exemplary embodiment of the application one for database realizing device Figure.
Fig. 6 is the block diagram of another database realizing device shown in the exemplary embodiment of the application one.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appended The example of the consistent apparatus and method of some aspects be described in detail in claims, the application.
It is only merely for the purpose of description specific embodiment in term used in this application, and is not intended to be limiting the application. " one kind " of singulative used in the application and appended claims, " described " and "the" are also intended to including majority Form, unless context clearly shows that other implications.It is also understood that term "and/or" used herein refers to and wrapped Containing the associated list items purpose of one or more, any or all may be combined.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the application A little information should not necessarily be limited by these terms.These terms are only used for same type of information being distinguished from each other out.For example, do not departing from In the case of the application scope, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as One information.Depending on linguistic context, word as used in this " if " can be construed to " ... when " or " when ... When " or " in response to determining ".
,, can be to the main table of system when accessing SQLite databases first by taking SQLite databases as an example in correlation technique The create sentences of sqlite_master memory storages such as are segmented, parsed at the operation, to generate a resident internal storage structure. The internal storage structure is used for some summary infos for depositing SQLite databases, such as:Show, index name, trigger name etc.. The number of columns of tables of data is more in SQLite databases, and it is more to may result in sqlite_master row, accesses SQLite first The read-write operation of database is more, so as to cause the speed that accesses first low, while takes substantial amounts of internal memory.
In view of the above-mentioned problems, the application provides a kind of database realizing scheme, by the row in the tables of data of merging data storehouse, To reduce the number of columns of the main table of system, so as to improve the speed that database accesses first, and memory headroom is saved.
Fig. 1 is a kind of schematic flow sheet of database implementation method shown in the exemplary embodiment of the application one.
It refer to Fig. 1, the database implementation method can apply the organizer deployment in database to be used for tissue number According to the electronic equipment in storehouse, include following steps:
Step 101, original row to be combined are determined.
In the present embodiment, the original list shows that database organizer plans the row of deployment when organizing tables of data, than Such as:Row for storing URL (Uniform Resource Locator, URL) etc..
In the present embodiment, the less original row of inquiry times can be defined as original row to be combined, so as to follow-up Inquiry operation.In practical implementations, the original row that access frequency can be less than to threshold value are defined as original row to be combined, its In, the access frequency can be configured by developer.
As an example it is assumed that database is used for the related data for storing certain APP (Application, application program), the number There are an original URL arranged for storing a conventional button icon in the APP user interfaces, the original row according to the tables of data in storehouse Generally only after user downloads the APP, it is queried, then the original row can be defined as to be combined original when starting first Row.
Certainly, those skilled in the art can also determine original row to be combined using other modes, such as:According to warp Specified original row to be combined etc. are tested, the application is not particularly limited to this.
Step 102, for each record of tables of data, according to the regular train value by the original row to be combined of merging Processing is merged, obtains merging train value.
In the present embodiment, the merging rule can according to train value, (train value represents certain in this record by developer One row value) particular type be configured.In one example, if the train value of original row to be combined is character string, Then splicing merging directly can be carried out to above-mentioned original train value.
Record Original row 1 to be combined Original row 2 to be combined Original row 3 to be combined
25 Hdfh 46 Dfh98
Table 1
As an example it is assumed that determine that certain tables of data has 3 original row to be combined, the 25th article of record of the tables of data this The train value of 3 original row to be combined is as shown in table 1, after this 3 original train values are merged, can obtain merging train value “Hdfh,46,Dfh98”。
, can first will be to be combined if the train value of original row to be combined is not all character string in another example Original train value is spliced together, and then carries out serializing processing to splicing result, and splicing result is converted into binary numeral, The binary data is exactly the merging train value obtained after merging treatment.Wherein, serializing is handled and can freely realized, the application couple This is not particularly limited.
In the present embodiment, it is identified for ease of access equipment pairing and train value, can is to merge train value addition to merge Flag bit, such as:It can be realized by adding the modes such as a spcial character before or after the merging train value.
Step 103, corresponding insertion merges train value in the merging row of the tables of data.
Based on abovementioned steps 102, after being merged to the train value of original row, it can will merge train value and correspondingly be inserted into conjunction In side by side.The row for merging row and planning deployment when organizing tables of data independently of the database side of knitting in the tables of data.
Please continue to refer to the embodiment shown in Fig. 1, by taking SQLite databases as an example, data base organization side is in deployment database When, for each record of tables of data, URL, pictorial information etc. can not be accessed or accessed frequency is less original Row train value is merged, and the merging train value obtained after merging storage is merged in row to preassigned, reduces tables of data Number of columns, and then reduce sqlite_master number of columns.When accessing SQLite databases first, before merging Reduce read-write operation, improve access rate, while the occupancy to internal memory can also be reduced.
The application is when disposing database it can be seen from above description, for each record of tables of data, Ke Yigen The train value of original row to be combined is merged into processing according to rule is merged, obtains merging train value, and in the merging of the tables of data Corresponding insertion merges train value in row, reduces the number of columns of tables of data, and then reduces the number of columns of the main table of system, and reduction is visited first Ask that read-write during database to key message takes, improve the speed accessed first, while the occupancy to internal memory can also be reduced.
Based on the Merge Scenarios shown in Fig. 1, the application also provides a kind of database implementation method, for data base querying. The database implementation method can be applied in the access device, and the access equipment can be intelligent terminal, tablet personal computer, PC Machine etc..Fig. 2 is refer to, the database implementation method includes following steps:
Step 201, train value is read from the tables of data of database.
In the present embodiment, access of the access equipment to database can include:Read access and write access, wherein, write visit Asking to include:Insertion, modification etc..Whether read access or write access are required to read from the data table related of database Data, for ease of description, the data read can be referred to as to train value (train value represents certain value for being recorded in a certain row).
Step 202, whether the train value for judging to read is merging train value after multiple original train values merge.
Based on abovementioned steps 201, after train value is read, it can be determined that merging mark whether is carried in the train value Position, if not carrying, the train value that can determine to read is not to merge train value, can be entered according to the implementation in correlation technique Row processing.If the train value read, which carries, merges flag bit, it is to merge train value that can illustrate the train value, and then performs step 203。
Step 203, if the train value read is merges train value, target train value is obtained according to regular reverse resolution is merged.
Based on the judged result of abovementioned steps 202, after it is determined that the train value read is to merge train value, merging can be parsed Train value, the original train value before being merged, this target train value accessed is then found in original train value.
Exemplified by merging rule and be serializing processing, in this step, for merging train value, inverted sequence first can be carried out to it Rowization processing, the merging train value after serializing is handled are reduced to multiple original train values, then looked into multiple original train values Find the target train value of this access.
After target train value is found, if read access, then it can be inserted in field corresponding to Object;If Write access, then write operation can be carried out to the target train value according to the write access, after write operation is finished, according to merging Rule merges the non-targeted train value in new target train value and the merging train value, obtains new merging train value, uses The new merging train value for merging train value and replacing the tables of data storage.
For example, still by taking the original train value shown in table 1 as an example, recorded for this, data base organization side is in tissue number During according to storehouse, serializing processing is carried out to the original train value of original row 1,2 and 3 to be combined, obtains merging train value 1.In this reality Apply in example, access equipment is read based on write access merges train value 1, then carries out unserializing processing to the merging train value, can So that the merging train value 1 to be reduced to the original train value shown in table 1.Assuming that the write access is to need original train value 2 being revised as " 48 ", then original train value 2 can be revised as " 48 " by access equipment by " 46 ", and then access equipment continuation can be to original row The train value " Dfh98 " of the new train value " 48 " of 1 train value " Hdfh ", original row 2 and original row 3 is spliced, and then carries out sequence Rowization processing, it is assumed that obtain merging train value 2 after serializing processing, then access equipment merging train value 2 is corresponding to update the data table In merging train value 1, so as to realize the write access of pairing and train value.
In the present embodiment, based on train value merge after database, the application access equipment still can carry out read access, Write access.
Corresponding with the embodiment of the database implementation method shown in earlier figures 1, present invention also provides database realizing The embodiment of device.
The embodiment of the application database realizing device can be applied on an electronic device.Device embodiment can be by soft Part is realized, can also be realized by way of hardware or software and hardware combining.Exemplified by implemented in software, as a logical meaning On device, be to be read corresponding computer program instructions in nonvolatile memory by the processor of electronic equipment where it Get what operation in internal memory was formed.For hardware view, as shown in figure 3, the electronics where the application database realizing device A kind of hardware structure diagram of equipment, except the processor shown in Fig. 3, internal memory, network interface and nonvolatile memory it Outside, the electronic equipment in embodiment where device can also include other hardware generally according to the actual functional capability of the electronic equipment, This is repeated no more.
Fig. 4 is a kind of block diagram of database realizing device shown in the exemplary embodiment of the application one.
Fig. 4 is refer to, the database realizing device 300 can be applied in the electronic equipment shown in earlier figures 3, including Have:Row determining unit 301, train value combining unit 302 and train value insertion unit 303.
Wherein, row determining unit 301, original row to be combined are determined;
Train value combining unit 302, will be described to be combined original according to rule is merged for each of tables of data record The train value of row merges processing, obtains merging train value;
Train value inserts unit 303, the corresponding insertion merging train value in the merging row of the tables of data.
Optionally, the row determining unit 301, by access frequency be less than threshold value original row be defined as it is to be combined original Row.
Optionally, the train value combining unit 302, will be described to be combined original for each of tables of data record The train value of row carries out serializing processing, and the binary numeral obtained after serializing is handled is defined as the merging train value.
Optionally, the train value combining unit 302, also addition merges flag bit in the merging train value, for accessing Equipment identifies.
Corresponding with the embodiment of the database implementation method shown in earlier figures 2, present invention also provides database realizing The embodiment of device.
The embodiment of the application database realizing device can be applied on the access device.Device embodiment can be by soft Part is realized, can also be realized by way of hardware or software and hardware combining.Exemplified by implemented in software, as a logical meaning On device, be to be read corresponding computer program instructions in nonvolatile memory by the processor of access equipment where it Get what operation in internal memory was formed.For hardware view, as shown in figure 5, being accessed where the application database realizing device A kind of hardware structure diagram of equipment, except the processor shown in Fig. 5, internal memory, network interface and nonvolatile memory it Outside, the access equipment in embodiment where device can also include other hardware generally according to the actual functional capability of the access equipment, This is repeated no more.
Fig. 6 is a kind of block diagram of database realizing device shown in the exemplary embodiment of the application one.
Fig. 6 is refer to, the database realizing device 500 can be applied in the access equipment shown in earlier figures 5, including Have:Train value reading unit 501, merge judging unit 502, train value resolution unit 503 and train value writing unit 504.
Wherein, train value reading unit 501, train value is read from the tables of data of database;
Merge judging unit 502, whether the train value for judging to read is merging train value after multiple original train values merge;
Train value resolution unit 503, if the train value read obtains mesh to merge train value, according to regular reverse resolution is merged Mark train value.
Optionally, the merging judging unit 502, including:Whether the train value for judging to read carries merging flag bit; When the train value read carries merging flag bit, it is determined that the train value read is the merging train value after multiple original train values merging.
Optionally, the merging rule includes:, will be to be combined multiple original for each of tables of data record The train value of row carries out serializing processing;
The train value resolution unit 503, pairing and train value carry out unserializing processing, obtain target train value.
Optionally, the access frequency of the original row to be combined is less than threshold value.
Optionally, the train value reading unit, based on write access, train value is read from the tables of data of database;
Train value writing unit 504, write operation is carried out to the target train value according to the write access;Performed in write operation Bi Hou, the non-targeted train value in new target train value and the merging train value is merged according to the rule that merges, obtained To new merging train value;With the new merging train value for merging train value and replacing the tables of data and storing.
The function of unit and the implementation process of effect specifically refer to and step are corresponded in the above method in said apparatus Implementation process, it will not be repeated here.
For device embodiment, because it corresponds essentially to embodiment of the method, so related part is real referring to method Apply the part explanation of example.Device embodiment described above is only schematical, wherein described be used as separating component The unit of explanation can be or may not be physically separate, can be as the part that unit is shown or can also It is not physical location, you can with positioned at a place, or can also be distributed on multiple NEs.Can be according to reality Need to select some or all of module therein to realize the purpose of application scheme.Those of ordinary skill in the art are not paying In the case of going out creative work, you can to understand and implement.
System, device, module or the unit that above-described embodiment illustrates, it can specifically be realized by computer chip or entity, Or realized by the product with certain function.One kind typically realizes that equipment is computer, and the concrete form of computer can To be personal computer, laptop computer, cell phone, camera phone, smart phone, personal digital assistant, media play In device, navigation equipment, E-mail receiver/send equipment, game console, tablet PC, wearable device or these equipment The combination of any several equipment.
Corresponding with the embodiment of the database implementation method shown in earlier figures 1, it is real that the application also provides a kind of database Existing equipment, the database realizing equipment include:Processor and the memory for storing machine-executable instruction.Wherein, locate Reason device and memory are generally connected with each other by internal bus.In other possible implementations, the equipment is also possible to wrap External interface is included, can be communicated with other equipment or part.
In the present embodiment, by reading and performing the corresponding with the control logic of database realizing of the memory storage Machine-executable instruction, the processor is prompted to:
Determine original row to be combined;
For each record of tables of data, the train value of the original row to be combined is merged according to rule is merged Processing, obtain merging train value;
Corresponding insertion merges train value in the merging row of the tables of data.
Optionally, it is determined that during original row to be combined, the processor is prompted to:
The original row that access frequency is less than to threshold value are defined as original row to be combined.
Optionally, for each of tables of data record, according to merging rule by the row of the original row to be combined When value merges processing, the processor is prompted to:
For each record of tables of data, the train value of the original row to be combined is subjected to serializing processing, and will The binary numeral obtained after serializing processing is defined as the merging train value.
Optionally, the processor is also prompted to:
Addition merges flag bit in the merging train value, so that access equipment identifies.
Corresponding with the embodiment of the database implementation method shown in earlier figures 1, the application also provides a kind of computer can Storage medium is read, is stored thereon with computer program, the program realizes following steps when being executed by processor:
Determine original row to be combined;
For each record of tables of data, the train value of the original row to be combined is merged according to rule is merged Processing, obtain merging train value;
Corresponding insertion merges train value in the merging row of the tables of data.
Optionally, the determination original row to be combined, including:
The original row that access frequency is less than to threshold value are defined as original row to be combined.
Optionally, each record for tables of data, it is regular by the original row to be combined according to merging Train value merges processing, including:
For each record of tables of data, the train value of the original row to be combined is subjected to serializing processing, and will The binary numeral obtained after serializing processing is defined as the merging train value.
Optionally, in addition to:
Addition merges flag bit in the merging train value, so that access equipment identifies.
Corresponding with the embodiment of the database implementation method shown in earlier figures 2, it is real that the application also provides a kind of database Existing equipment, the database realizing equipment include:Processor and the memory for storing machine-executable instruction.Wherein, locate Reason device and memory are generally connected with each other by internal bus.In other possible implementations, the equipment is also possible to wrap External interface is included, can be communicated with other equipment or part.
In the present embodiment, by reading and performing the corresponding with the control logic of database realizing of the memory storage Machine-executable instruction, the processor is prompted to:
Train value is read from the tables of data of database;
Judge whether the train value that reads is merging train value after multiple original train values merge;
If the train value read obtains target train value to merge train value, according to regular reverse resolution is merged.
Optionally, when whether the train value for judging to read is the merging train value after multiple original train values merge, the place Reason device is prompted to:
Whether the train value for judging to read carries merging flag bit;
If the train value read, which carries, merges flag bit, it is determined that after the train value read merges for multiple original train values Merge train value.
Optionally, the merging rule includes:, will be to be combined multiple original for each of tables of data record The train value of row carries out serializing processing;
When obtaining target train value according to the regular reverse resolution of merging, the processor is prompted to:
Pairing and train value progress unserializing processing, obtain target train value.
Optionally, the access frequency of the original row to be combined is less than threshold value.
Optionally, when train value is read in the tables of data from database, the processor is prompted to:
Based on write access, train value is read from the tables of data of database;
The processor is also prompted to:Write operation is carried out to the target train value according to the write access;
After write operation is finished, according to the rule that merges by new target train value and the merging train value Non-targeted train value merges, and obtains new merging train value;
With the new merging train value for merging train value and replacing the tables of data and storing.
Corresponding with the embodiment of the database implementation method shown in foregoing 2, the application also provides a kind of computer-readable Storage medium, computer program is stored thereon with, the program realizes following steps when being executed by processor:
Train value is read from the tables of data of database;
Judge whether the train value that reads is merging train value after multiple original train values merge;
If the train value read obtains target train value to merge train value, according to regular reverse resolution is merged.
Optionally, it is described to judge whether the train value that reads is merging train value after multiple original train values merge, including:
Whether the train value for judging to read carries merging flag bit;
If the train value read, which carries, merges flag bit, it is determined that after the train value read merges for multiple original train values Merge train value.
Optionally, the merging rule includes:, will be to be combined multiple original for each of tables of data record The train value of row carries out serializing processing;
It is described that target train value is obtained according to the regular reverse resolution of merging, including:
Pairing and train value progress unserializing processing, obtain target train value.
Optionally, the access frequency of the original row to be combined is less than threshold value.
Optionally, train value is read in the tables of data from database, including:
Based on write access, train value is read from the tables of data of database;
Methods described also includes:
Write operation is carried out to the target train value according to the write access;
After write operation is finished, according to the rule that merges by new target train value and the merging train value Non-targeted train value merges, and obtains new merging train value;
With the new merging train value for merging train value and replacing the tables of data and storing.
The preferred embodiment of the application is the foregoing is only, not limiting the application, all essences in the application God any modification, equivalent substitution and improvements done etc., should be included within the scope of the application protection with principle.

Claims (20)

1. a kind of database implementation method, including:
Determine original row to be combined;
For each record of tables of data, the train value of the original row to be combined is merged into place according to rule is merged Reason, obtain merging train value;
Corresponding insertion merges train value in the merging row of the tables of data.
2. according to the method for claim 1, the determination original row to be combined, including:
The original row that access frequency is less than to threshold value are defined as original row to be combined.
3. according to the method for claim 1, each record for tables of data, is treated according to rule is merged by described The train value of the original row merged merges processing, including:
For each of tables of data record, the train value of the original row to be combined is subjected to serializing processing, and by sequence The binary numeral obtained after change processing is defined as the merging train value.
4. the method according to claim 11, in addition to:
Addition merges flag bit in the merging train value, so that access equipment identifies.
5. a kind of database implementation method, including:
Train value is read from the tables of data of database;
Judge whether the train value that reads is merging train value after multiple original train values merge;
If the train value read obtains target train value to merge train value, according to regular reverse resolution is merged.
6. according to the method for claim 5, whether the train value for judging to read is after multiple original train values merge Merge train value, including:
Whether the train value for judging to read carries merging flag bit;
If the train value read, which carries, merges flag bit, it is determined that the train value read is the merging after multiple original train values merging Train value.
7. according to the method for claim 5,
The merging rule includes:For each record of the tables of data, the train value of multiple original row to be combined is entered Row serializing is handled;
It is described that target train value is obtained according to the regular reverse resolution of merging, including:
Pairing and train value progress unserializing processing, obtain target train value.
8. according to the method for claim 7,
The access frequency of the original row to be combined is less than threshold value.
9. train value according to the method for claim 5, is read in the tables of data from database, including:
Based on write access, train value is read from the tables of data of database;
Methods described also includes:
Write operation is carried out to the target train value according to the write access;
After write operation is finished, according to the rule that merges by new target train value and the non-mesh merged in train value Mark train value merges, and obtains new merging train value;
With the new merging train value for merging train value and replacing the tables of data and storing.
10. a kind of database realizing device, including:
Row determining unit, determine original row to be combined;
Train value combining unit, for each record of tables of data, according to the regular row by the original row to be combined of merging Value merges processing, obtains merging train value;
Train value inserts unit, the corresponding insertion merging train value in the merging row of the tables of data.
11. device according to claim 10,
The row determining unit, the original row that access frequency is less than to threshold value are defined as original row to be combined.
12. device according to claim 10,
The train value combining unit, for each record of tables of data, the train value of the original row to be combined is subjected to sequence Rowization processing, and the binary numeral obtained after serializing is handled is defined as the merging train value.
13. device according to claim 10,
The train value combining unit, also addition merges flag bit in the merging train value, so that access equipment identifies.
14. a kind of database realizing device, including:
Train value reading unit, train value is read from the tables of data of database;
Merge judging unit, whether the train value for judging to read is merging train value after multiple original train values merge;
Train value resolution unit, if the train value read obtains target train value to merge train value, according to regular reverse resolution is merged.
15. device according to claim 14,
The merging judging unit, including:Whether the train value for judging to read carries merging flag bit;Taken in the train value read During tape merge flag bit, it is determined that the train value read is the merging train value after multiple original train values merging.
16. device according to claim 14,
The merging rule includes:For each record of the tables of data, the train value of multiple original row to be combined is entered Row serializing is handled;
The train value resolution unit, pairing and train value carry out unserializing processing, obtain target train value.
17. device according to claim 14,
The access frequency of the original row to be combined is less than threshold value.
18. device according to claim 14,
The train value reading unit, based on write access, train value is read from the tables of data of database;
Described device also includes:
Train value writing unit, write operation is carried out to the target train value according to the write access;After write operation is finished, root The non-targeted train value in new target train value and the merging train value is merged according to the rule that merges, obtains new conjunction And train value;With the new merging train value for merging train value and replacing the tables of data and storing.
19. a kind of database realizing equipment, including:
Processor;
For storing the memory of machine-executable instruction;
Wherein, can perform by reading and performing the machine corresponding with the control logic of database realizing of the memory storage Instruction, the processor are prompted to:
Determine original row to be combined;
For each record of tables of data, the train value of the original row to be combined is merged into place according to rule is merged Reason, obtain merging train value;
Corresponding insertion merges train value in the merging row of the tables of data.
20. a kind of database realizing equipment, including:
Processor;
For storing the memory of machine-executable instruction;
Wherein, can perform by reading and performing the machine corresponding with the control logic of database realizing of the memory storage Instruction, the processor are prompted to:
Train value is read from the tables of data of database;
Judge whether the train value that reads is merging train value after multiple original train values merge;
If the train value read obtains target train value to merge train value, according to regular reverse resolution is merged.
CN201710465882.2A 2017-06-19 2017-06-19 Database implementation method, device and equipment Active CN107436918B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710465882.2A CN107436918B (en) 2017-06-19 2017-06-19 Database implementation method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710465882.2A CN107436918B (en) 2017-06-19 2017-06-19 Database implementation method, device and equipment

Publications (2)

Publication Number Publication Date
CN107436918A true CN107436918A (en) 2017-12-05
CN107436918B CN107436918B (en) 2020-08-11

Family

ID=60459020

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710465882.2A Active CN107436918B (en) 2017-06-19 2017-06-19 Database implementation method, device and equipment

Country Status (1)

Country Link
CN (1) CN107436918B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117216059A (en) * 2023-09-06 2023-12-12 北京奥星贝斯科技有限公司 Data table merging method, device, equipment and medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11841857B2 (en) 2022-02-22 2023-12-12 International Business Machines Corporation Query efficiency using merged columns

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102243624A (en) * 2010-11-02 2011-11-16 泗阳天琴软件科技有限公司 Several new functions of spreadsheet
CN102937931A (en) * 2012-09-25 2013-02-20 北京奇虎科技有限公司 A method and system for log data transmission
CN103646096A (en) * 2013-12-18 2014-03-19 用友软件股份有限公司 Method and device for generating sub-queries through user configuration
US8943058B1 (en) * 2009-12-14 2015-01-27 Teradata Us, Inc. Calculating aggregates of multiple combinations of a given set of columns

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8943058B1 (en) * 2009-12-14 2015-01-27 Teradata Us, Inc. Calculating aggregates of multiple combinations of a given set of columns
CN102243624A (en) * 2010-11-02 2011-11-16 泗阳天琴软件科技有限公司 Several new functions of spreadsheet
CN102937931A (en) * 2012-09-25 2013-02-20 北京奇虎科技有限公司 A method and system for log data transmission
CN103646096A (en) * 2013-12-18 2014-03-19 用友软件股份有限公司 Method and device for generating sub-queries through user configuration

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
IT屋: ""如何拆分python中的DataFrame列"", 《HTTP://WWW.IT1352.COM/605470.HTML》 *
RISOTTO: ""将数据库中的两列合并成一列来显示"", 《HTTPS://WWW.XUEBUYUAN.COM/256494.HTML》 *
SIEGE: ""Oracle将一列分成多列"", 《HTTPS://BLOG.CSDN.NET/U010999240/ARTICLE/DETAILS/45652547/ 》 *
匿名: ""pandas dataframe 合并两列"", 《HTTP://WENDA.CHINAHADOOP.CN/QUESTION/5669》 *
融智技术学院: ""MySQL的合并两列,并添加到一个新列"", 《HTTP://BLOG.SINA.COM.CN/S/BLOG_768552710101JFPW.HTML》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117216059A (en) * 2023-09-06 2023-12-12 北京奥星贝斯科技有限公司 Data table merging method, device, equipment and medium

Also Published As

Publication number Publication date
CN107436918B (en) 2020-08-11

Similar Documents

Publication Publication Date Title
CN111352902B (en) Log processing method, device, terminal equipment and storage medium
JP4859595B2 (en) Storage system, data relocation method thereof, and data relocation program
CN111352935B (en) A method, device and device for index creation in a blockchain ledger
US11222067B2 (en) Multi-index method and apparatus, cloud system and computer-readable storage medium
CN114036171B (en) Application data management method, device, computer equipment and storage medium
CN108733324B (en) Data reading and writing method, device and equipment of solid state disk and storage medium
CN107402950A (en) Divide the document handling method and device of table based on point storehouse
CN109460406A (en) Data processing method and device
CN101763433B (en) Data storage system and method
CN114610951A (en) Data processing method, apparatus, electronic device and readable storage medium
CN111930363B (en) Block interface code generation method and device
CN104598161A (en) Data reading and writing method and device and data storage structure
US11487731B2 (en) Read iterator for pre-fetching nodes of a B-tree into memory
US8726101B2 (en) Apparatus and method for tracing memory access information
CN107436918A (en) Database implementation method, device and equipment
CN111694580B (en) Method and device for upgrading and initializing storage device and electronic device
CN110222046A (en) Processing method, device, server and the storage medium of table data
CN112000971B (en) File permission recording method, system and related device
CN112036133B (en) File storage method and device, electronic equipment and storage medium
CN111209062A (en) Information acquisition method and device, electronic equipment and computer storage medium
CN112882659B (en) Information obtaining method and device, electronic equipment and storage medium
CN117577163A (en) SSD bad block detection method, SSD bad block detection device, computer equipment and storage medium
CN111435285B (en) Data writing method and device for storage volume, electronic equipment and machine-readable storage medium
CN111143006B (en) Method and device for acquiring command help information
CN102945342A (en) Method, device and terminal equipment for progress identification

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20200924

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200924

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Patentee before: Alibaba Group Holding Ltd.