CN101315628B - Internal memory database system and method and device for implementing internal memory data base - Google Patents
Internal memory database system and method and device for implementing internal memory data base Download PDFInfo
- Publication number
- CN101315628B CN101315628B CN2007101058902A CN200710105890A CN101315628B CN 101315628 B CN101315628 B CN 101315628B CN 2007101058902 A CN2007101058902 A CN 2007101058902A CN 200710105890 A CN200710105890 A CN 200710105890A CN 101315628 B CN101315628 B CN 101315628B
- Authority
- CN
- China
- Prior art keywords
- table record
- memory block
- database
- record
- storage unit
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a memory database system which comprises a communication interface, a establishing device, a write operation device, a query operation device and a relief operation device; the establishing device is used for establishing a first storage area of the description information of a memory database in a shared memory, storing a second storage area used for locating the index information of table records and a third storage area used for storing the table records, and storing the description information of the memory database into the first storage area; the third storage area comprises storage units which are matched with the table records in size, and each storage unit stores one table record of the database, a physical block is formed by the storage units which have the same size and are continuous in physical space, and a logical block is linked by one physical block or a plurality of the same physical blocks. The invention also discloses a method for establishing the memory database, a method and the device for establishing multiple indexes. The invention realizes the loose coupling of the memory database table structure and the data storage structure, and can flexibly establish and manage the memory database.
Description
Technical field
The present invention relates to the database technology of the computing machine and the communications field, particularly a kind of memory database technology.
Background technology
Present memory database is by the data in the frequently-used data storehouse table in the system all are mapped in the main frame shared drive, by using the fixing array of data structures database table that each is fixing to be kept in the shared drive, just with the table space of a memory block in the internal memory, according to the actual size of table record this memory block is divided into a plurality of memory blocks and preserves data in the database table as a database table; Set up the internal memory index on the critical field in database table, critical data is carried out real time access by this internal memory index.Memory system is provided for application programming interface API (Application Programming Interface) interface that the data in the main memory database table are made amendment and retrieved, application program is when these database tables of visit, API by the invoke memory database visits the data in the shared drive, rather than directly visit data in the physical database table, therefore, can improve the real time access performance of system to critical data.
Because by using the fixing array of data structures database table that each is fixing to be kept in the shared drive, the degree of coupling is bigger between the storage of described data and the structure of data base table recording, causes can not creating flexibly and the management database table.For example, when in memory database, increasing database table, must revise the bottom (promptly needing to write again or revise code) of memory database; And for example, when the list structure to database changes, also need to revise the bottom of memory database.Therefore, existing memory database storage mode is difficult to realize the dynamic expansion in tables of data space; In addition, owing to adopt fixing data structure to preserve table record, so also relatively more serious for the table space waste of the database table that has variable-length field.
Summary of the invention
The embodiment of the invention provides a kind of memory database system and realizes the method and apparatus of memory database, with the degree of coupling raising establishment between the list structure of data storage and memory database in the reduction memory database, the dirigibility of management database.
A kind of memory database system comprises:
Communication interface is used to receive the various message and the output function result in request operational data storehouse;
Creation apparatus, be used for setting up first memory block of the descriptor of stored data base at shared drive, store second memory block of the index information that is used for the navigation watch record and the 3rd memory block of storage list record, and the descriptor of database is saved in described first memory block, wherein, described the 3rd memory block comprises the storage unit with table record size coupling, data base table recording of each cell stores, identical size and on physical space continuous storage unit constitute a physical block, a physical block or a plurality of identical physical block are associated to a logical block;
The write operation device, be used at described action need when database table adds table record, inquire about described descriptor with the big or small logical block that mates with the size of described table record of the storage unit of selecting to comprise, and table record is write in the storage unit idle in the logical block of selection, and the positional information of table record is written in the described index information;
The query manipulation device is used at described action need when the database table question blank writes down, and inquires about the index information of second memory block and reads table record according to Query Result corresponding storage unit from the 3rd memory block, and select to satisfy the table record of querying condition;
The releasing operation device, be used at described action need during from the table record of database table deletion appointment, discharge the storage unit of the table record of the described appointment of storage from the 3rd memory block, and from second memory block, delete the relevant index information of table record described and appointment.
A kind of method of creating memory database comprises step:
The size of table record in specified data storehouse list structure and each database table;
In shared drive, set up first memory block of the descriptor of stored data base, store second memory block of the index information that is used for the navigation watch record and the 3rd memory block of storage list record, wherein, described second memory block comprises the storage unit with an index information size coupling, described the 3rd memory block comprises the storage unit with table record size coupling, data base table recording of each cell stores of described the 3rd memory block, identical size and on physical space continuous storage unit constitute a physical block, a physical block or a plurality of identical physical block are associated to a logical block;
The descriptor of database is saved in described first memory block, and the descriptor of described database comprises the descriptor of each database table.
A kind of device of creating memory database comprises:
Determining unit is used for the size of specified data storehouse list structure and each database table table record;
Creating unit, be used for setting up first memory block of the descriptor of stored data base at shared drive, store second memory block of the index information that is used for the navigation watch record and the 3rd memory block of storage list record, wherein, described second memory block comprises the storage unit with an index information size coupling, described the 3rd memory block comprises the storage unit with table record size coupling, data base table recording of each cell stores of described the 3rd memory block, identical size and on physical space continuous storage unit constitute a physical block, a physical block or a plurality of identical physical block are associated to a logical block;
Preserve the unit, be used for the descriptor of database is saved in described first memory block, the descriptor of described database comprises the descriptor of each database table, and the descriptor of described database table comprises storage unit size in the described logical block of each database table association and each logical block.
A kind of method of access memory Database Systems comprises step:
Receive the request message of operation memory database;
When described action need adds table record in database table, inquire about descriptor in first memory block to select a logical block according to this database table, the storage unit size that this logical block comprises is complementary with the size of described table record, and, described table record is write in the storage unit idle in the logical block of selection, and the positional information of storage list record is recorded in the index information of second memory block;
Perhaps, when described action need during from the data base querying table record, determine corresponding index information according to the descriptor that the field in this database table and the querying condition is inquired about in first memory block, and, inquire about definite index information from second memory block and read table record, select to satisfy the table record of described querying condition according to Query Result corresponding storage unit from the 3rd memory block;
Perhaps,, discharge the storage unit of the table record of the described appointment of storage from the 3rd memory block when described action need during from the table record of database table deletion appointment, and from second memory block relevant index information of deletion table record described and appointment.
A kind of device of access memory Database Systems, described device comprises:
Receiving element is used to receive the request message of operating memory database;
The logical block selected cell, be used at described action need when database table adds table record, the descriptor of inquiring about database in first memory block according to this database table is to select a logical block, and the storage unit size that this logical block comprises is complementary with the size of described table record;
Write operation unit is used for table record is write in the idle storage unit of the logical block of selection, and the positional information of storage list record is recorded in the index information of second memory block;
The index information query unit is used at described action need during from the data base querying table record, inquires about the descriptor of database in first memory block according to the field in this database table and the querying condition and determines corresponding index information;
Indexing units is used for inquiring about from second memory block index information that described index information query unit determines and corresponding storage unit reads table record from the 3rd memory block according to Query Result, and selects to satisfy the table record of described querying condition;
Releasing unit is used at described action need discharging the storage unit of the table record of the described appointment of storage from the 3rd memory block during from the table record of database table deletion appointment, and from second memory block relevant index information of deletion table record described and appointment.
In the embodiment of the invention, in shared drive, set up the 3rd memory block of first memory block of the descriptor of stored data base, second memory block of storing the index information that is used for the navigation watch record and storage list record, determine index information by descriptor, determine table record by index information, thereby realized the loose coupling of memory database list structure and data store organisation, can create flexibly and the managing internal memory database.Therefore the storage unit that the size of table record is complementary in distribution of the 3rd memory block and database table, can realize the flexible storage of the table record of different length, thereby reduces the resource occupation of shared drive.
Description of drawings
Figure 1A is the storage space synoptic diagram of memory database in the embodiment of the invention;
Figure 1B is the structural representation of memory database system in the embodiment of the invention;
Fig. 2 be in the embodiment of the invention storage unit and physical block concern synoptic diagram;
Fig. 3 A is the storage node form intention of storage unit in the embodiment of the invention;
Fig. 3 B is the list structure synoptic diagram of idle storage unit in the embodiment of the invention;
Fig. 4 A is a process flow diagram of creating memory database in the embodiment of the invention;
Fig. 4 B is an apparatus structure synoptic diagram of creating memory database in the embodiment of the invention;
Fig. 4 C is the relation signal of memory database visit shared memory space in the embodiment of the invention;
Fig. 5 A is the process flow diagram of access memory database in the embodiment of the invention;
Fig. 5 B is the synoptic diagram that dynamically expands physical block in the embodiment of the invention;
Fig. 6 is the synoptic diagram of many index structures in the embodiment of the invention;
Fig. 7 is the structural representation of leaf node tree in the embodiment of the invention;
Fig. 8 A, Fig. 8 B, Fig. 8 C are the dependency structure synoptic diagram of the device of access memory database in the embodiment of the invention;
Fig. 9 is a process flow diagram of creating many index in the embodiment of the invention;
Figure 10 is for utilizing the process flow diagram of many search indexs table record in the embodiment of the invention;
Figure 11 is a structural representation of creating the device of many index in the embodiment of the invention;
Figure 12 is for utilizing the structural representation of the device of many search indexs table record in the embodiment of the invention.
Embodiment
In embodiments of the present invention, according to the function of the storage space of memory database in shared drive, described storage space is divided into first memory block, second memory block and the 3rd memory block, shown in Figure 1A.Wherein, the descriptor of the first storage area stores database (or claiming Database Systems definition information), second storage area stores is used for the index information of navigation watch record, and the 3rd memory block is used for the table record of stored data base table.First memory block, second memory block and the 3rd memory block can continuous distribution on physical space, also can be non-continuous distribution; Same, each memory block in first memory block, second memory block and the 3rd memory block can be continuous distribution on physical space, also can be non-continuous distribution.
A kind of structure of memory database system comprises shown in Figure 1B in the present embodiment: communication interface 10, creation apparatus 11, write operation device 12, query manipulation device 13 and releasing operation device 14; In order to expand storage space dynamically, memory database system also further comprises a scanister 15.
Consult shown in Figure 2ly, comprise in the 3rd memory block and the storage unit Slot of the table record of database table size coupling that this storage unit is the minimum memory unit of memory database, data base table recording of each cell stores.Size (being memory capacity) identical and on physical space continuous storage unit constitute a physical block Extent, the number of memory cells that each physical block comprises can be different; A physical block Extent or a plurality of identical physical block Extent association (or claiming binding) become a logical block Chunk.In the present embodiment, physical block is the elementary cell that is tied to logical block.
In an example, also can adopt the storage organization that is similar to the 3rd memory block in second memory block, size (being memory capacity) identical and on physical space continuous storage unit constitute a physical block Extent, the number of memory cells that each physical block comprises can be different; A physical block Extent or a plurality of identical physical block Extent association (or claiming binding) become a logical block Chunk.Like this, the positional information of a table record can be stored among the storage unit Slot.The storage organization of second memory block and the 3rd storage area is unified, can streamlining management and maintenance.In another example, second storage area adopts common storage organization, promptly by existing storage mode canned data, for example, is distributed on the physical space continuously and the positional information of the cell stores table record that size is unified.
In the present embodiment, can limit the greatest physical number of blocks of forming a logical block according to actual needs, for example, at most related 40 physical blocks of logical block.Accordingly, the addressing bit number that physical block is supported can be set also, comprise the maximum quantity of storage unit to determine each physical block; For example, each physical block is supported 24 bit addressing spaces, and then each physical block comprises 16777216 (2 at most
24) storage unit.
The descriptor of the database in first memory block has comprised the information of fulfillment database function needs, for example, and the descriptor of system lock, storage space, the descriptor of database table etc.; Wherein, system lock is loaded in the corresponding database table, visits this database table to prevent other application processes using the database maintenance process database table in the database to be adjusted (as the incidence relation between backup and recovery table recording process or adjustment form record) time.The descriptor of storage space comprises the quantity of logical block, physical block quantity that each logical block comprises, number of memory cells that physical block comprises and the size (being memory capacity) of storage unit; The descriptor of database table comprises table lock, table index definition information etc., table index definition information comprises the field that constitutes index, the index information of each index correspondence in second memory block and index lock etc., wherein table lock is used to prevent that two processes from making amendment to same record simultaneously, and the table index lock can prevent that index is not by other process operation.
Index information in second memory block can adopt multiple index type, for example, and array, index tree etc.Index tree also can adopt multiple tree construction, for example, and binary tree, balanced tree, and the list of feature values and leaf node tree.In eigenwert and leaf node tree construction, the eigenwert constitutive characteristic value table (the eigenwert difference in the list of feature values) of the key assignments of index field correspondence, the corresponding leaf node tree of each eigenwert, the leaf node tree is made of the leaf node of storage list record position information, navigates to corresponding storage unit by the leaf node on the traverse tree.Described eigenwert can select various algorithms to obtain as required, and is typical, adopts Hash Hash computing.
When organizing index information by array type, can adopt straight line integer linear indexed mode, index field adopts the integer (key assignments of index field is also unique continuously) of 4 byte-sized under this indexed mode, and provide the parameter of two integer types, first integer is represented the minimum value of index field key assignments, and second integer represented the maximal value of index field key assignments; Memory database system directly builds up an integer array that does not have hash-collision to index field when creating index, the storage unit of a storage list record of each element directed in the data set.Because each key assignments is unique, so can carry out quick access by direct access function.When organizing index information by Hash table and leaf node tree, can adopt scale-of-two byte string indexing mode, this mode is treated as a scale-of-two byte string with indexed field, and this scale-of-two byte string carried out Hash Hash computing, this indexed mode provides the integer of an expression table size, and this integer affects the effect of cryptographic hash hash in the Hash table.Structure with Hash table and leaf node tree record sheet record position information is that example describes in the present embodiment.
Storage unit in the 3rd storage is the minimum memory unit in the memory database, and for convenience of maintenance and management, the information of a cell stores can be made of a plurality of fields.As shown in Figure 3A, a storage unit comprises header field and data field.Behind the cell stores table record, data field is the storage list recorded content then, the header field can description list the information of affiliated database table of record and the physical length of this table record etc.The byte number that the header fields account is used canned data amount as required pre-determines, and for example, the header fields account is with 8 bytes.When storage unit was the free time, header can be used for depositing the positional information of current another idle storage unit of logical block, and this positional information can comprise logical block identification, physical block sign and storage unit sign; Like this, all idle storage unit connect into an idle chained list by self header in logical block.When needs were applied for storage unit from logical block, then a storage unit was taken out in the gauge outfit position from this free time chained list; When discharging a table record, just the storage unit of correspondence is added to the afterbody of idle chained list.In this idle chain list structure, the pointer that points to idle storage unit points to the idle storage unit of the gauge outfit position of chained list all the time, because visit is different with the cycle with the time that discharges storage unit, so should the free time chained list may not be continuous on physical space.In the example shown in Fig. 3 B, the physical block among logical block Chunk has n physical block Extent 1 to Extent n, among physical block Extent 1 and the physical block Extent n idle storage unit is arranged, and these idle storage unit form idle chained list.
After logical block, physical block and cell stores structure were adopted in the 3rd memory block, the distribution of the database table storage area of memory database can be adopted multiple mode.In one embodiment, adopt the storage area of table binding logical block mode allocation database table, promptly, a database table is mapped in one or more logical blocks of appointment, when increasing table record in database table, the storage unit of at every turn seeking idle and size and table record coupling in the logical block of this database table binding is to deposit the table record of appointment.In another embodiment, storage area by table dynamic allocation logic block mode allocation database table, promptly, the logical block of binding is not shown in the fixed data storehouse, when in database table, increasing table record, select the logical block of the storage unit size that comprises and table record size coupling according to the size of table record to be stored, then select storage unit storage list record in logical block; If when existing a plurality of logical blocks available, then from these logical blocks, select a logical block storage list record of free space maximum, make the quantity of occupied storage unit in these logical blocks with balance.
Because a database table can be associated with a plurality of logical blocks, and the storage unit size that different logical blocks comprises can be inequality, for example, is bundled in logical block A, B on the same database table; Wherein the size of the storage unit that comprises of logical block A is 20 bytes, and the storage unit size that logical block B comprises is 25 bytes, therefore, can select the logical block of coupling according to actual size for the table record that has variable-length field, thereby can realize saving the storage resources of database table in the shared drive by table record size allocation table storage space.
Consult shown in Fig. 4 A, the treatment scheme of creating memory database in the present embodiment is as follows:
The size of table record in step 400, specified data storehouse list structure (as, the field that database table comprises) and each database table.
Accordingly, a kind of device of creating memory database comprises shown in Fig. 4 B: determining unit 40, creating unit 41 and preservation unit 42; Wherein, the size of table record in determining unit 40 specified data storehouse list structures and each database table; Creating unit 41 is set up described first memory block, second memory block and the 3rd memory block according to the result who obtains of described determining unit 40 in shared drive; Preservation unit 42 is saved in described first memory block with the descriptor of database.
After memory database is created, can produce an in-process memory database map addresses data structure ChunkMap during memory database application programming interface API instantiation, be used to preserve the virtual memory address BaseAddr after all physical blocks are mapped to this process, also note corresponding relation simultaneously with logical block.When memory database API need locate the table record of appointment or idle storage unit, by logical block identification ChunkId and physical block sign ExtentId, find physical block and be mapped to the virtual memory address BaseAddr that originally carries out, calculate side-play amount Offset according to the sign Slot Id of storage unit in conjunction with storage unit size SlotSize then with respect to virtual memory address BaseAddr, obtain the real process virtual memory address of storage unit RecPtr then, carry out data access.Like this, realized the visit of internal storage data library to shared drive, it concerns shown in Fig. 4 C.
In the present embodiment, each logical block has a timestamp, upgrades this timestamp when increasing physical block in the logical block.The application process of memory database is determined to be mapped to according to the timestamp of logical block should whether logical block be synchronous accordingly with in the logical block of process and the 3rd memory block, if asynchronous then shine upon again, can have access to the storage space of up-to-date memory database to guarantee each application process.
The action type of access memory database comprises query manipulation, modification (renewal) operation, interpolation operation and the deletion action to table record, and these operations can be summed up as the question blank record, add a kind of operation or multiple operation in table record and three kinds of operations of delete list record.For example, deletion action and retouching operation all will be inquired about corresponding table record earlier, and then carry out follow-up operation.For the application process that prevents database is read dirty data,, can after inquire corresponding table record, add amended table record earlier, and then delete original table record for revising the table record operation.
Consult shown in Fig. 5 A, in the present embodiment, the main flow process of access memory shared data bank is as follows:
The database table of step 502, operation is as required inquired about the descriptor in described first memory block, selects the big or small logical block that mates with the size of described table record of storage unit that comprises.
The descriptor that the database table of step 504, operation as required and the field in the querying condition are inquired about in first memory block is determined corresponding index information.
In step 502, if there is not idle storage unit in the logical block, then can dynamically expand, i.e. application distributes a physical block.The treatment scheme of a dynamic Extended Spaces is shown in Fig. 5 B:
The descriptor of storage space in step 552, renewal first memory block, as, the timestamp of this logical block, physical block information and location information etc.
The idle chained list of storage unit in step 553, the construction logic piece.
In the present embodiment, the database table of memory database adopts many indexed modes to improve the overall performance of inquiry velocity and raising database, and each index adopts cryptographic hash table and leaf node tree mode (list of feature values that can certainly adopt other computings to obtain).Each database table has a plurality of index, and an index of database table can comprise an index field in this database table, also can comprise a plurality of index fields.For example, for a database table with A (as " name " field), B, C, D, E, 6 fields of F 3 index can be arranged, first index comprises the A field, and second index comprises B, C, D field, and the 3rd index comprises E, F field.Certainly, can set up 4 index or more index as required; And as required, wherein some field also can be not used in and set up index.Under each index, (when an index was made up of a plurality of index fields, key assignments was meant that the key assignments of each index field is by the synthetic key assignments of predetermined der group to table record corresponding to the key value Key of index field.) constitute a Hash table by the cryptographic hash that obtains after the Hash operation, each cryptographic hash wherein is associated with a leaf node tree that is made of the leaf node of storage list record position information, same leaf node tree goes up the table record of each leaf node correspondence under the index field of correspondence, its key assignments produces the Hash collision, though that is to say that its key assignments is different but it obtains identical cryptographic hash after Hash operation, consult shown in Figure 6.
After adopting many indexed modes, table index definition information specifically comprises in first memory block: use a title to describe the index-name of a field or several fields, index sign (as the numbering of all index in the table), whether index attributes is (unique as key assignments, indexing means and Multiple Bonds sort method etc.), the concordance list size, index field (comprising the side-play amount of field in record and the array of length), indexing parameter is (long as Hash Hash table, maximal value, the positional information at this index place), Multiple Bonds sort field and index data leaf node place logical block identification etc.
In second memory block, a Hash table can be kept in the storage unit, owing in same storage unit query cryptographic hash, can further improve the overall performance of index speed and database.Leaf node on the leaf node tree can adopt the cell stores of identical size, and the leaf node on index tree can be stored in the storage unit that same logical block comprises, and also can be stored in respectively in the storage unit that a plurality of logical blocks comprise.
Consult shown in Figure 7ly, have first incidence relation (the horizontal leaf node among Fig. 7) and second incidence relation (the vertical leaf node among Fig. 7) on the leaf node tree that is associated with a cryptographic hash.Under same index, the key assignments difference of the pairing table record of leaf node in first incidence relation, the key assignments of the pairing table record of leaf node in second incidence relation is identical, and the head lobe child node in last first incidence relation of the cryptographic hash of each non-zero sensing leaf node tree in the Hash table.On the leaf node tree, each leaf node can have three pointers, wherein, first pointer is used in reference to the follow-up leaf node in first incidence relation, to form a chained list, second pointer land used points to the follow-up leaf node in second incidence relation, to form another chained list, the 3rd pointer then is used in reference to the storage unit (only show the cryptographic hash 1 leaf node tree related with cryptographic hash m among Fig. 7, the leaf node tree of other cryptographic hash relations is not shown) of storage list record in the 3rd memory block.
Accordingly, a kind of device of access memory database comprises shown in Fig. 8 A: logical block selected cell 81, write operation unit 82, index information query unit 83, indexing units 84 and releasing unit 85.Wherein, when logical block selected cell 81 adds table record at the action need of access memory Database Systems in database table, select a logical block according to the descriptor that database table is inquired about in first memory block, the storage unit size that this logical block comprises is complementary with the size of table record to be present; As, for the aforementioned storage unit that comprises header field and data field, being complementary is meant that data field size is consistent with the table record size; Write operation unit 82 writes table record in the storage unit idle in the logical block of logical block selected cell 81 selections, and the positional information (being the address of storage unit) of storage list record is written in the index information of described second memory block.Index information query unit 83 during from the data base querying table record, is determined corresponding index information according to the descriptor that the field in this database table and the querying condition is inquired about in first memory block at the action need of access memory Database Systems; Indexing units 84 is inquired about index information that described index information query unit 83 determines and is read table record according to Query Result corresponding storage unit from the 3rd memory block from second memory block, and selects to satisfy the table record of described querying condition; Releasing unit 85 during from the table record of database table deletion appointment, discharges the storage unit of the table record of the described appointment of storage at described action need from the 3rd memory block, and from second memory block relevant index information of deletion table record described and appointment; The table record of described appointment can be the record of appointment in the accessing operation request message, if in the accessing operation request message be the condition of deletion record, then earlier navigate to the table record that satisfies condition by index information query unit 83 and indexing units 84, and then deletion.
Write operation unit 82 can comprise: the first storage operation module 820 and the second storage operation module 821; The first storage operation module 820 is obtained the storage unit of a free time from a logical block of selecting, and table record to be stored is stored in this idle storage unit; The second storage operation module 821 records the positional information of storage list record in the index information of second memory block.
In the embodiment that adopts many indexed modes, the second storage operation module 821 comprises shown in Fig. 8 B in the write operation unit 82: first module 8210, second module 8211 and the three module 8212; Wherein, first module 8210 is inquired about corresponding descriptor in first memory block according to table record place database table, obtains the predefined a plurality of index fields of this database table; Second module 8211 is extracted the key assignments of each index field correspondence from described table record, and obtains the eigenwert that each key-value pair is answered; Three module 8212 is inquired about corresponding cryptographic hash table in second memory block respectively according to each cryptographic hash, if there is this cryptographic hash in the list of feature values, then on the index tree of this cryptographic hash association, increase the node that comprises the table record positional information, otherwise, cryptographic hash is added the cryptographic hash table and creates the node that comprise table record positional information related with this cryptographic hash.Wherein, comprising on the leaf node tree of first incidence relation and second incidence relation, described three module 8212 increases when comprising the node of table record positional information on index tree, in first incidence relation, search for the node of the identical table record association of key assignments earlier, if do not search, then on first incidence relation, increase the node that comprises the table record positional information,, then on second incidence relation at this node place, increase the node that comprises the table record positional information if search.
On second incidence relation, increase the node that comprises the table record positional information, insertion node in certain sequence can sort, this definite sequence can have multiple, for example: press priority positive sequence that table record inserts, press priority inverted order that table record inserts, by the big or small positive sequence of the sort field of current index or the big or small inverted order of pressing the sort field of current index.
When adopting many indexed modes, a kind of structure of index information query unit 83 shown in Fig. 8 A and indexing units 84 is shown in Fig. 8 C, index information query unit 83 comprises list of feature values determination module 830, and database table that is used for operating as required and field are inquired about the definite cryptographic hash table that need inquire about in second memory block in first memory block; Indexing units 84 comprises: list of feature values enquiry module 840 and index module 841; Wherein, list of feature values enquiry module 840 obtains corresponding cryptographic hash according to the key assignments in the described querying condition, and the cryptographic hash table determined of query characteristics value table determination module 830, obtains the leaf node tree of this cryptographic hash association; Node in the described index tree of index module 841 search with read the related table record of node from the 3rd memory block, with in the table record corresponding to the key assignments and the comparison of described querying condition of index field, be met the table record of querying condition.Owing in table index definition information, comprise the side-play amount of index field in table record, therefore, index module 841 is when selecting to satisfy the table record of querying condition, from the record that reads, select corresponding key assignments and querying condition to compare according to described side-play amount, querying condition wherein generally is that strong value needs satisfied condition in this index field, as, for a database table, for index field " sex " wherein, querying condition is: sex=" man ", and promptly key assignments is " man "; And for index field " member's job number " wherein, querying condition can be: member job number>123450.Index module 841 is on comprising the leaf node tree of first incidence relation and second incidence relation during search node, in first incidence relation, search for the node of the identical table record association of key assignments earlier, if do not search, then stop search, if search, then on second incidence relation at the node place that searches, travel through each node successively.
In an instantiation, the main treatment scheme of the many index of establishment comprises step as shown in Figure 9 in second memory block:
In the step 904, on comprising the leaf node tree of first incidence relation and second incidence relation, increase when comprising the node of table record positional information on the search node, in first incidence relation, inquire about the node of the identical table record association of key assignments earlier, if do not inquire, then on first incidence relation, increase the node that comprises the table record positional information, if inquire, then on second incidence relation at this node place, increase the node that comprises the table record positional information.
When the corresponding key assignments of the related index field of certain node in the key assignments of index field correspondence and the leaf node tree is identical, insertion node in order can sort in second incidence relation, this order can have multiple, for example: press priority positive sequence that table record inserts, press priority inverted order that table record inserts, by the big or small positive sequence of the sort field of current index or the big or small inverted order of pressing the sort field of current index.
According to the treatment scheme of many search indexs table record of setting up in second memory block as shown in figure 10, comprise step:
The database table of step 1000, operation as required and the descriptor of index field Query Database table need to determine the cryptographic hash table of inquiry.
The cryptographic hash table that step 1002, inquiry are determined obtains corresponding index tree.
The device of the many index of establishment as shown in figure 11 in an instantiation, comprise: definition module 1100, first module 1101, second module 1102 and the three module 1103, wherein, definition module 1100 defines a plurality of index fields in database table, and sets up each index field characteristic of correspondence value table in second memory block; First module 1101 is inquired about corresponding descriptor in first memory block according to table record place database table, obtains the predefined a plurality of index fields of this database table; Second module 1102 is extracted the key assignments of each index field correspondence from described table record, and each key assignments is carried out Hash operation obtains the cryptographic hash that each key-value pair is answered; Three module 1103 is inquired about corresponding cryptographic hash table in second memory block respectively according to each cryptographic hash, if have corresponding cryptographic hash in this cryptographic hash table, then on the index tree of this cryptographic hash association, increase the node that comprises the table record positional information, otherwise, cryptographic hash is added the cryptographic hash table and creates the node that comprise table record positional information related with this cryptographic hash.
Accordingly, the device that utilizes many search indexs table record as shown in figure 12, comprise: list of feature values determination module 1200, list of feature values enquiry module 1201 and index module 1202, wherein, the database table operated as required of list of feature values determination module 1200 and field are inquired about first memory block determine the cryptographic hash table that need inquire about in second memory blocks; List of feature values enquiry module 1201 obtains the characteristic of correspondence value and the definite list of feature values of inquiry according to the key assignments in the querying condition, obtains the index tree of this eigenwert association; Node in the described index tree of index module 1202 search with read the related table record of node from the 3rd memory block, with in the table record corresponding to the key assignments and the comparison of described querying condition of index field, be met the table record of described querying condition.
In the present embodiment, the query function of table record is realized by means of many index structures of table, when inquiring about, can preserve a cursor structure to the process space by many index, this cursor structure is used for preserving the position of current leaf node and the position of current leaf node place second first leaf node of index relative, adopt the vernier mode in fact not take out total data, but point to the sign pointer of branch node, can increase substantially the speed of inquiry like this.
When the query function question blank record that uses memory database application programming interface API to provide, can set in advance a self-filtering condition table record is filtered inquiry, this filtercondition can adopt one three layer data structures, wherein, atom filtercondition of bottom definition, each atom filtercondition is specified the field that will judge by side-play amount in the record and length, specify an operational symbol then, the parameter of specify arithmetic again, promptly specify an Operator (field, para, [, para2]) such Rule of judgment; A plurality of atom filterconditions carry out forming a second layer filtercondition after the AND operation; A plurality of second layer filterconditions carry out having formed the three layer filtration condition after the inclusive-OR operation.The maximum quantity of atom filtercondition and second layer filtercondition can limit, and for example, the atom filtercondition mostly is 8 most, and second layer filtercondition mostly is 8 most.The example of the data structure definition of a filtercondition is as follows:
typedef?struct
{
Int or_item_num; Have in structure of // expression what " or " relation
struct
{
Int and_item_num; Have in structure of // expression what " with " relation
struct
{
Int field_offset; // define field side-play amount
Int field_length; // define field length
Int operator; // defining operation
struct
{
Int para_length; // parameter length
Void * paraptr; // definition is used in reference to the pointer of the value in condition
Op_para[2]; The array of computing parameter value is preserved in // definition
And_items[8]; // definition 8 comparing units, the pass between the comparing unit be " with " relation
Or_items[8]; // definition 8 comparing units, the pass between the comparing unit be " with " relation
}t_Filter;
In the present embodiment, can further define, so that when carrying out condition judgment, can access the value that parameter is returned operational symbol and relevant parameters.For example:
Greater than computing: if the field of filtercondition and parameter carry out scale-of-two relatively after, field is returned during greater than parameter true;
More than or equal to computing: if the field of filtercondition and parameter carry out scale-of-two relatively after, field is returned during more than or equal to parameter true;
Equal computing: if the field of filtercondition and parameter carry out scale-of-two relatively after, return true when field equals parameter;
Be not equal to computing: if the field of filtercondition and parameter carry out scale-of-two relatively after, return true when field is not equal to parameter;
Smaller or equal to computing: if the field of filtercondition and parameter carry out scale-of-two relatively after, field is returned during smaller or equal to parameter true:
Less-than operation: if the field of filtercondition and parameter carry out scale-of-two relatively after, field is returned during less than parameter true:
The between computing: if the field of filtercondition and parameter carry out scale-of-two relatively after, field is returned during smaller or equal to parameter 2 true more than or equal to parameter 1.
One of ordinary skill in the art will appreciate that, realize that all or part of step in the foregoing description method is to finish by the relevant hardware of programmed instruction, described program can be stored in the computer read/write memory medium, this program is when carrying out, but the treatment step that comprises in execution graph 4A, Fig. 5 A, Fig. 5 B, Fig. 9 and the flow process shown in Figure 10.
The memory database that provides in the present embodiment has been realized the loose coupling of memory database list structure and data store organisation, when storage list writes down, can realize the memory module of the variable-length record of same table by choosing the logical block that is complementary with the table record size, reduce taking of table space resource in the shared drive; The mode in dynamic expansion tables space has guaranteed not exist between memory database list structure and the data store organisation coupled relation in the present embodiment, and, when system passes through the dynamic expansion tables of a memory database process space, it is consistent with the timestamp of this logic will in the system definition district that other memory database application processes are upgraded the timestamp of this in-process logical block, guaranteed the memory headroom mapping synchronously.
The memory database that present embodiment provides can satisfy the real-time requirement that data are visited in a large number, can be applicable in the system that has relatively high expectations in real time, for example, the memory database that adopts present embodiment to provide in a Real-time Billing System improves the real-time response performance of system, database storing user's relevant information and the professional charge information of use.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.
Claims (39)
1. a memory database system is characterized in that, comprising:
Communication interface is used to receive the various message and the output function result in request operational data storehouse;
Creation apparatus, be used for setting up first memory block of the descriptor of stored data base at shared drive, store second memory block of the index information that is used for the navigation watch record and the 3rd memory block of storage list record, and the descriptor of database is saved in described first memory block, wherein, described the 3rd memory block comprises the storage unit with table record size coupling, data base table recording of each cell stores, identical size and on physical space continuous storage unit constitute a physical block, a physical block or a plurality of identical physical block are associated to a logical block;
The write operation device, be used at described action need when database table adds table record, inquire about described descriptor with the storage unit size selecting to comprise a logical block, and table record is write in the storage unit idle in the logical block of selection and the positional information of table record is recorded in second memory block with the size coupling of described table record;
The query manipulation device is used at described action need when the database table question blank writes down, and inquires about the index information of second memory block and reads table record according to Query Result corresponding storage unit from the 3rd memory block, and select to satisfy the table record of querying condition;
The releasing operation device, be used at described action need during from the table record of database table deletion appointment, discharge the storage unit of the table record of the described appointment of storage from the 3rd memory block, and from second memory block, delete the relevant index information of table record described and appointment.
2. memory database system as claimed in claim 1 is characterized in that, also comprises:
Scanister is used for the idle storage unit of scanning logic piece, and when idle storage unit is less than threshold value in finding logical block, produces information or directly be associated with described logical block for this physical block of logical block distribution and with it.
3. memory database system as claimed in claim 1, it is characterized in that, described second memory block comprises the storage unit with an index information size coupling, identical size and on physical space continuous storage unit constitute a physical block, a physical block or a plurality of identical physical block are associated to a logical block.
4. memory database system as claimed in claim 1 is characterized in that, described creation apparatus comprises:
Determining unit is used for the size of specified data storehouse list structure and each database table table record;
Creating unit is used for setting up described first memory block, second memory block and the 3rd memory block at shared drive;
Preserve the unit, be used for the descriptor of database is saved in described first memory block, the descriptor of described database comprises the descriptor of each database table.
5. memory database system as claimed in claim 1 is characterized in that, described query manipulation device comprises:
The index information query unit, the descriptor that is used for inquiring about when the database table question blank writes down at described action need first memory block is determined index information;
Indexing units is used for the index information determined from second memory block inquiry and corresponding storage unit reads table record from the 3rd memory block according to Query Result, and selects to satisfy the table record of described querying condition.
6. memory database system as claimed in claim 5 is characterized in that, described write operation device comprises:
The logical block selected cell, be used at described action need when database table adds table record, inquire about descriptor in described first memory block to select a logical block according to this database table, the storage unit size that this logical block comprises is complementary with the size of described table record;
Write operation unit is used for the table record that needs add is write in the idle storage unit of the logical block of selection, and the positional information of preserving table record in second memory block.
7. memory database system as claimed in claim 6 is characterized in that, described write operation unit comprises:
The first storage operation module is used for obtaining the storage unit of a free time from a described logical block, and table record to be stored is stored in this idle storage unit;
The second storage operation module is used for the positional information at the described table record of index information record of second memory block.
8. memory database system as claimed in claim 7 is characterized in that, the described second storage operation module comprises:
First module is used for inquiring about the corresponding descriptor in first memory block according to table record place database table, obtains a plurality of index of this database table; Wherein, each index comprises one or more index fields, in second memory block, forming a list of feature values related respectively according to the resulting eigenwert of the key assignments of each table record under each index, be stored in respectively on the leaf node that a leaf node related with this eigenwert set in the positional information of the table record that has the same characteristic features value under the same index with index;
Second module is used for being extracted in key assignments corresponding under each index from described table record, and obtains the eigenwert that each key-value pair is answered;
Three module, be used for inquiring about the corresponding list of feature values in second memory block respectively according to each eigenwert, if there is this eigenwert in the list of feature values, then on the leaf node tree of this eigenwert association, increase the leaf node that comprises the table record positional information, otherwise, eigenwert is added the list of feature values and creates the leaf node that comprise table record positional information related with this eigenwert.
9. memory database system as claimed in claim 8 is characterized in that, described index information query unit comprises:
List of feature values determination module, database table that is used for operating as required and field are inquired about the definite list of feature values that need inquire about in second memory block in first memory block;
Described indexing units comprises:
List of feature values enquiry module is used for obtaining the characteristic of correspondence value and the definite list of feature values of inquiry according to the key assignments of described querying condition, obtains the leaf node tree of this eigenwert association;
Index module, the leaf node that is used for searching for described leaf node tree with read the related table record of node from the 3rd memory block, with in the table record corresponding to the key assignments and the comparison of described querying condition of index, be met the table record of this querying condition.
10. memory database system as claimed in claim 9 is characterized in that, comprises the side-play amount of index field in table record in the descriptor of described database; Described index module selects corresponding key assignments and querying condition to compare from the table record that reads according to described side-play amount when selecting to satisfy the table record of querying condition.
11. memory database system as claimed in claim 9, it is characterized in that, in a leaf node tree, the leaf node that has the table record correspondence of different key assignments under index forms first incidence relation, and the leaf node with record correspondence of identical key assignments forms second incidence relation.
12. memory database system as claimed in claim 11, it is characterized in that, described three module increases when comprising the leaf node of table record positional information on the leaf node tree, in first incidence relation, search for the leaf node of the identical table record association of key assignments earlier, if do not search, then on first incidence relation, increase the leaf node that comprises the table record positional information, if search, then on second incidence relation at this leaf node place, increase the leaf node that comprises the table record positional information.
13. memory database system as claimed in claim 11, it is characterized in that, during the leaf node of described index module in search leaf node tree, in first incidence relation, search for the leaf node of the identical table record association of key assignments earlier, if do not search, then stop search,, then on second incidence relation at the leaf node place that searches, travel through each leaf node successively if search.
14., it is characterized in that described eigenwert is a cryptographic hash as each described memory database system of claim 8-13, corresponding, the described list of feature values is a Hash table.
15. a method of creating memory database is characterized in that, comprises step:
The size of table record in specified data storehouse list structure and each database table;
In shared drive, set up first memory block of the descriptor of stored data base, store second memory block of the index information that is used for the navigation watch record and the 3rd memory block of storage list record, wherein, described second memory block comprises the storage unit with an index information size coupling, described the 3rd memory block comprises the storage unit with table record size coupling, data base table recording of each cell stores of described the 3rd memory block, identical size and on physical space continuous storage unit constitute a physical block, a physical block or a plurality of identical physical block are associated to a logical block;
The descriptor of database is saved in described first memory block, and the descriptor of described database comprises the descriptor of each database table.
16. method as claimed in claim 15 is characterized in that, the storage unit of described the 3rd memory block comprises header field and data message field; When this storage unit was taken by table record, the header field of this storage unit was preserved the information of the affiliated table of this table record and the physical length of this table record; When storage unit was idle, the header field of this storage unit was preserved the positional information of another the idle storage unit in the same logical block, made the idle storage unit in this logical block form chained list.
17. method as claimed in claim 16 is characterized in that, each described logical block has a timestamp, upgrades described timestamp when increasing physical block in the described logical block; The application process of described database is determined to be mapped to according to described timestamp should whether logical block be synchronous accordingly with in the logical block of process and the 3rd memory block.
18. a device of creating memory database is characterized in that, comprising:
Determining unit is used for the size of specified data storehouse list structure and each database table table record;
Creating unit, be used for setting up first memory block of the descriptor of stored data base at shared drive, store second memory block of the index information that is used for the navigation watch record and the 3rd memory block of storage list record, wherein, described second memory block comprises the storage unit with an index information size coupling, described the 3rd memory block comprises the storage unit with table record size coupling, data base table recording of each cell stores of described the 3rd memory block, identical size and on physical space continuous storage unit constitute a physical block, a physical block or a plurality of identical physical block are associated to a logical block;
Preserve the unit, be used for the descriptor of database is saved in described first memory block, the descriptor of described database comprises the descriptor of each database table, and the descriptor of described database table comprises storage unit size in the described logical block of each database table association and each logical block.
19. the method for access memory Database Systems is characterized in that, described method is applied in the arbitrary described system of claim 1~14, and described method comprises step:
Receive the request message of operation memory database;
When described action need adds table record in database table, inquire about descriptor in first memory block to select a logical block according to this database table, the storage unit size that this logical block comprises is complementary with the size of described table record; And, described table record is write in the storage unit idle in the logical block of selection, and the positional information of storage list record is recorded in the index information of second memory block;
Perhaps, when described action need during, determine corresponding index information according to the descriptor that the field in this database table and the querying condition is inquired about in first memory block from the data base querying table record; And, inquire about definite index information from second memory block and read table record according to Query Result corresponding storage unit from the 3rd memory block, select to satisfy the table record of described querying condition;
Perhaps,, discharge the storage unit of the table record of the described appointment of storage from the 3rd memory block when described action need during from the table record of database table deletion appointment, and from second memory block relevant index information of deletion table record described and appointment.
20. method as claimed in claim 19 is characterized in that, a logical block of selection is meant the idle maximum logical block of storage unit in all logical blocks that the size of the storage unit size that comprises and described table record is complementary.
21. method as claimed in claim 19, it is characterized in that, described being operating as when adding the table record operation if described first memory block of inquiry need to determine the database table of operation to bind the logical block of the table record of storing this database table, then selected a logical block from the logical block of binding.
22. method as claimed in claim 19 is characterized in that, described being operating as when revising the table record operation added amended table record earlier, and then deleted the table record that is modified in the 3rd memory block.
23., it is characterized in that described storage unit comprises header field and data message field as each described method of claim 19-22; When this storage unit was taken by table record, the header field of this storage unit was preserved the information of the affiliated table of this table record and the physical length of this table record; When storage unit was idle, the header field of this storage unit was preserved the positional information of another the idle storage unit in the same logical block, made the idle storage unit in the same logical block form chained list.
24. method as claimed in claim 23 is characterized in that, when needs take storage unit in the logical block, obtains a storage unit from the gauge outfit of described chained list; Perhaps, when the storage unit in the described logical block of release, the storage unit that discharges is joined the afterbody of described chained list.
25. method as claimed in claim 19, it is characterized in that, in second memory block, adopt the positional information of many indexed modes storage list record of database table, these many indexed modes with a plurality of fields of database table as index field, under each index field, form a list of feature values respectively according to the resulting eigenwert of the key assignments of each table record, on the positional information of the table record that has the same characteristic features value under the same index field is stored in leaf node with the related leaf node tree of eigenwert identical described in the list of feature values respectively, and in the descriptor of the database of first memory block, corresponding index field is associated with characteristic of correspondence value table.
26. method as claimed in claim 25 is characterized in that, the positional information of storage list record is recorded comprise step in the index information of described second memory block:
Determine each index field of this database table according to data base querying first memory block, table record place;
From described table record, extract the key assignments of each index field correspondence, and obtain the eigenwert that each key-value pair is answered;
Utilize each eigenwert to inquire about the corresponding list of feature values in second memory block respectively, if there is this eigenwert in the list of feature values, then on the leaf node tree of this eigenwert association, increase the leaf node that comprises the table record positional information, otherwise, eigenwert is added the list of feature values and creates the leaf node that comprise table record positional information related with this eigenwert.
27. method as claimed in claim 25, it is characterized in that, descriptor in described inquiry first memory block determines that corresponding index information is meant, Cao Zuo database table and field are inquired about the definite list of feature values that need inquire about in first memory block in second memory block as required;
The described index information of determining from second memory block inquiry and from the 3rd memory block corresponding storage unit read the table record that table record is met described querying condition and be meant, obtain the characteristic of correspondence value and the definite list of feature values of inquiry according to the key assignments in the described condition, obtain the leaf node tree of this eigenwert association, and search in the described leaf node tree leaf node with read the related table record of leaf node from the 3rd memory block, key assignments and described condition corresponding to index field in the table record compared, be met the table record of described querying condition.
28. method as claimed in claim 27, it is characterized in that, comprise the side-play amount of index field in table record in the descriptor of database, when selecting to satisfy the table record of querying condition, from the table record that reads, select corresponding key assignments and querying condition to compare according to described side-play amount.
29. as each described method of claim 25-28, it is characterized in that, in the described leaf node tree, the leaf node that has the table record correspondence of different key assignments under index forms first incidence relation, and the leaf node with record correspondence of identical key assignments forms second incidence relation.
30. method as claimed in claim 29, it is characterized in that, on the leaf node tree, increase when comprising the leaf node of table record positional information, in first incidence relation, inquire about the leaf node of the identical table record association of key assignments earlier, if do not inquire, then on first incidence relation, increase the leaf node that comprises the table record positional information,, then on second incidence relation at this leaf node place, increase the leaf node that comprises the table record positional information if inquire.
31. method as claimed in claim 29, it is characterized in that, during leaf node in search leaf node tree, in first incidence relation, search for the leaf node of the identical table record association of key assignments earlier, if do not search, then stop search,, then on second incidence relation at the leaf node place that searches, travel through each leaf node successively if search.
32. the device of access memory Database Systems is characterized in that, described device comprises:
Receiving element is used to receive the request message of operating memory database;
The logical block selected cell, be used at described action need when database table adds table record, the descriptor of inquiring about database in first memory block according to this database table is to select a logical block, and the storage unit size that this logical block comprises is complementary with the size of described table record;
Write operation unit is used for table record is write in the idle storage unit of the logical block of selection, and the positional information of storage list record is recorded in the index information of described second memory block;
The index information query unit is used at described action need during from the data base querying table record, inquires about the descriptor of database in first memory block according to the field in this database table and the querying condition and determines corresponding index information;
Indexing units is used for inquiring about from second memory block index information that described index information query unit determines and corresponding storage unit reads table record from the 3rd memory block according to Query Result, and selects to satisfy the table record of described querying condition;
Releasing unit is used at described action need discharging the storage unit of the table record of the described appointment of storage from the 3rd memory block during from the table record of database table deletion appointment, and from second memory block relevant index information of deletion table record described and appointment.
33. device as claimed in claim 32, it is characterized in that, be operating as when adding the table record operation when described, described logical block selected cell has been bound the logical block of the table record of storing this database table if the database table that need operate is determined in described first memory block of inquiry, then selects a logical block from the logical block of binding.
34. device as claimed in claim 32 is characterized in that, is operating as when revising the table record operation when described, releasing unit adds amended table record earlier in the 3rd memory block, and then the table record that is modified of deletion.
35., it is characterized in that described storage unit comprises header field and data message field as each described device of claim 32~34; When this storage unit was taken by table record, the header field of this storage unit was preserved the information of the affiliated table of this table record and the physical length of this table record; When storage unit was idle, the header field of this storage unit was preserved the positional information of another the idle storage unit in the same logical block, made the idle storage unit in the same logical block form chained list.
36. device as claimed in claim 32, it is characterized in that, described write operation unit adopts the positional information of many indexed modes storage list record of database table in second memory block, these many indexed modes with a plurality of fields of database table as index field, under each index field, form a list of feature values respectively according to the resulting eigenwert of the key assignments of each table record, on the positional information of the table record that has the same characteristic features value under the same index field is stored in leaf node with the related leaf node tree of eigenwert identical described in the list of feature values respectively, and in the descriptor of the database of first memory block, corresponding index field is associated with characteristic of correspondence value table.
37. device as claimed in claim 36, it is characterized in that described write operation unit records the positional information of storage list record in the index information of described second memory block and comprises: each index field of determining this database table according to data base querying first memory block, table record place;
From described table record, extract the key assignments of each index field correspondence, and obtain the eigenwert that each key-value pair is answered;
Utilize each eigenwert to inquire about the corresponding list of feature values in second memory block respectively, if there is this eigenwert in the list of feature values, then on the leaf node tree of this eigenwert association, increase the leaf node that comprises the table record positional information, otherwise, eigenwert is added the list of feature values and creates the leaf node that comprise table record positional information related with this eigenwert.
38. device as claimed in claim 37, it is characterized in that, described write operation unit increases when comprising the leaf node of table record positional information on the leaf node tree, in first incidence relation, search for the leaf node of the identical table record association of key assignments earlier, if do not search, then on first incidence relation, increase the leaf node that comprises the table record positional information,, then on second incidence relation at this leaf node place, increase the leaf node that comprises the table record positional information if search.
39. device as claimed in claim 37, it is characterized in that, during the leaf node of described indexing units in search leaf node tree, in first incidence relation, search for the leaf node of the identical table record association of key assignments earlier, if do not search, then stop search,, then on second incidence relation at the leaf node place that searches, travel through each leaf node successively if search.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2007101058902A CN101315628B (en) | 2007-06-01 | 2007-06-01 | Internal memory database system and method and device for implementing internal memory data base |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2007101058902A CN101315628B (en) | 2007-06-01 | 2007-06-01 | Internal memory database system and method and device for implementing internal memory data base |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101315628A CN101315628A (en) | 2008-12-03 |
CN101315628B true CN101315628B (en) | 2011-01-05 |
Family
ID=40106640
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2007101058902A Expired - Fee Related CN101315628B (en) | 2007-06-01 | 2007-06-01 | Internal memory database system and method and device for implementing internal memory data base |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101315628B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104636349A (en) * | 2013-11-07 | 2015-05-20 | 阿里巴巴集团控股有限公司 | Method and equipment for compression and searching of index data |
Families Citing this family (60)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101714167B (en) * | 2009-11-03 | 2013-03-06 | 北京九合创胜网络科技有限公司 | Method and device for accessing monofile database |
CN101826106B (en) * | 2010-04-09 | 2012-07-04 | 上海交通大学 | Telemetering data access method for ground station of unmanned airship system |
CN101859139B (en) * | 2010-06-01 | 2012-02-08 | 杭州和利时自动化有限公司 | Data sharing realizing method of distribution type control system and device thereof |
CN102447604B (en) * | 2010-09-30 | 2016-01-27 | 迈普通信技术股份有限公司 | Routing table information storage means and routing device |
CN102117338B (en) * | 2011-04-02 | 2013-03-13 | 天脉聚源(北京)传媒科技有限公司 | Data base caching method |
CN102346783B (en) * | 2011-11-09 | 2014-09-17 | 华为技术有限公司 | Data retrieval method and device |
CN103106144B (en) * | 2011-11-15 | 2015-10-28 | 北京新媒传信科技有限公司 | A kind of internal memory index compression method and apparatus |
CN102420814A (en) * | 2011-11-21 | 2012-04-18 | 航天科工深圳(集团)有限公司 | Data access method and device and server |
WO2013075306A1 (en) * | 2011-11-24 | 2013-05-30 | 华为技术有限公司 | Data access method and device |
CN102411632B (en) * | 2011-12-27 | 2014-08-20 | 北京人大金仓信息技术股份有限公司 | Chain table-based memory database page type storage method |
CN103593721B (en) * | 2012-08-13 | 2016-10-05 | 中国商用飞机有限责任公司 | Business process monitoring method based on Complex event processing |
CN102880704A (en) * | 2012-09-25 | 2013-01-16 | 上海证券交易所 | Novel concurrent memory data organization and access method |
CN103729304B (en) * | 2012-10-11 | 2017-03-15 | 腾讯科技(深圳)有限公司 | Data processing method and device |
CN102929979A (en) * | 2012-10-17 | 2013-02-13 | 华为技术有限公司 | Method and device for locating page memory space |
CN103020146A (en) * | 2012-11-22 | 2013-04-03 | 华为技术有限公司 | Data processing method and equipment |
CN103902548B (en) * | 2012-12-25 | 2017-06-23 | 航天信息股份有限公司 | A kind of system and method and registration, ticket booking, net purchase system for accessing database |
CN104298681B (en) * | 2013-07-18 | 2018-06-19 | 华为技术有限公司 | A kind of date storage method and device |
CN103473314A (en) * | 2013-09-11 | 2013-12-25 | 北京思特奇信息技术股份有限公司 | Key value pair storing method and device based on shared memory |
CN103473321A (en) | 2013-09-12 | 2013-12-25 | 华为技术有限公司 | Database management method and system |
CN103530067B (en) * | 2013-10-09 | 2017-06-09 | 华为技术有限公司 | A kind of method and apparatus of data manipulation |
CN103577553A (en) * | 2013-10-18 | 2014-02-12 | 汉柏科技有限公司 | Data storage method |
CN103593485B (en) * | 2013-12-04 | 2017-06-16 | 网易传媒科技(北京)有限公司 | The method and apparatus for realizing database real-time operation |
CN104731799B (en) * | 2013-12-20 | 2018-09-04 | 中国银联股份有限公司 | Main memory DBM device |
CN104866502B (en) * | 2014-02-25 | 2020-10-13 | 深圳市中兴微电子技术有限公司 | Data matching method and device |
CN105786939A (en) * | 2014-12-26 | 2016-07-20 | 中兴通讯股份有限公司 | Memory database optimization method and apparatus |
CN104657467B (en) * | 2015-02-11 | 2017-09-05 | 南京国电南自维美德自动化有限公司 | A kind of data-pushing framework with subscription/publication of real-time internal memory database |
CN104809183B (en) * | 2015-04-17 | 2018-06-22 | 北京奇艺世纪科技有限公司 | A kind of digital independent and the method and apparatus of write-in |
CN106796588B (en) | 2015-06-03 | 2019-11-22 | 华为技术有限公司 | The update method and equipment of concordance list |
CN105515868B (en) * | 2015-12-12 | 2019-05-28 | 中国航空工业集团公司西安航空计算技术研究所 | A kind of configuration and storage method of AFDX data acquisition instrument |
CN106021488A (en) * | 2016-05-19 | 2016-10-12 | 乐视控股(北京)有限公司 | Key value database management method and apparatus |
CN107688567B (en) * | 2016-08-03 | 2021-02-09 | 腾讯科技(深圳)有限公司 | Index storage method and related device |
CN106604043A (en) * | 2016-12-30 | 2017-04-26 | Ut斯达康(深圳)技术有限公司 | Internet-based live broadcast method and live broadcast server |
CN107145582B (en) * | 2017-05-09 | 2022-01-04 | 深圳Tcl新技术有限公司 | Control method of database cursor and database system |
CN108334541B (en) * | 2017-12-18 | 2019-11-05 | 南京中兴新软件有限责任公司 | A kind of date storage method, device, equipment and storage medium |
CN110019221B (en) * | 2017-12-18 | 2022-07-19 | 本无链科技(深圳)有限公司 | Memory mapping type database system |
CN109032817B (en) * | 2018-07-25 | 2022-03-18 | 天津凯发电气股份有限公司 | Method for realizing shared memory of power quality management system |
CN111061680B (en) * | 2018-10-15 | 2024-11-15 | 北京京东尚科信息技术有限公司 | A method and device for data retrieval |
CN111190908B (en) * | 2018-11-15 | 2023-09-22 | 华为技术有限公司 | Data management method, device and system |
CN109753382B (en) * | 2018-12-10 | 2022-01-07 | 厦门市美亚柏科信息股份有限公司 | Recovery method and system for database deleted records |
CN111279313A (en) * | 2018-12-18 | 2020-06-12 | 深圳市大疆创新科技有限公司 | FPGA chip and electronic equipment with same |
CN111459884B (en) * | 2019-03-26 | 2023-05-16 | 广州荔支网络技术有限公司 | Data processing method and device, computer equipment and storage medium |
CN111177143B (en) * | 2019-06-12 | 2024-04-12 | 腾讯科技(深圳)有限公司 | Key-value data storage method, device, storage medium and electronic device |
CN110399419B (en) * | 2019-07-30 | 2023-03-24 | 上海金融期货信息技术有限公司 | Relational template memory database system |
CN110910165B (en) * | 2019-10-29 | 2023-08-01 | 深圳市星河互动科技有限公司 | Multi-channel attribution method and related equipment |
CN111400248B (en) * | 2019-11-19 | 2023-06-30 | 杭州海康威视系统技术有限公司 | Method for writing data and recovering data and file system |
CN111274288B (en) * | 2020-01-17 | 2023-03-17 | 腾讯云计算(北京)有限责任公司 | Distributed retrieval method, device, system, computer equipment and storage medium |
CN111813773B (en) * | 2020-04-22 | 2024-07-12 | 深圳市科陆电子科技股份有限公司 | Power grid meter reading data storage method, uploading method, device and storage device |
CN111737166B (en) * | 2020-05-15 | 2023-04-07 | 完美世界(北京)软件科技发展有限公司 | Data object processing method, device and equipment |
CN113672586A (en) * | 2020-05-15 | 2021-11-19 | 永中软件股份有限公司 | Memory database based on Java technology and implementation method thereof |
CN111737254B (en) * | 2020-05-29 | 2022-12-23 | 苏州浪潮智能科技有限公司 | Method and device for improving application cache utilization rate |
CN111782628A (en) * | 2020-06-11 | 2020-10-16 | 国电南京自动化股份有限公司 | Method, configuration tool and system for dynamic expansion and increment of real-time library of power system |
CN114518834B (en) * | 2020-11-18 | 2023-10-27 | 中移物联网有限公司 | Information storage method and device and electronic equipment |
CN113127717A (en) * | 2021-03-30 | 2021-07-16 | 国家电网有限公司 | Key retrieval method and system |
CN113590212B (en) * | 2021-06-24 | 2024-10-25 | 阿里巴巴创新公司 | Method, device and equipment for starting database instance |
CN113486026A (en) * | 2021-08-02 | 2021-10-08 | 北京字节跳动网络技术有限公司 | Data processing method, device, equipment and medium |
CN115080614B (en) * | 2022-05-23 | 2024-10-15 | 苏州浪潮智能科技有限公司 | Monitoring data processing method, system, electronic equipment and storage medium |
CN115994145B (en) * | 2023-02-09 | 2023-08-22 | 中国证券登记结算有限责任公司 | Method and device for processing data |
CN117785248B (en) * | 2024-02-28 | 2024-05-24 | 上海励驰半导体有限公司 | Registration method and device of key variables in program upgrading, storage medium and chip |
CN118332049B (en) * | 2024-06-12 | 2024-09-13 | 中科山水(北京)科技信息有限公司 | Ecological resource data synchronization method and device and electronic equipment |
CN119337409A (en) * | 2024-12-23 | 2025-01-21 | 成都航空职业技术学院 | A property management work order processing method based on data processing |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1838124A (en) * | 2006-02-20 | 2006-09-27 | 南京联创科技股份有限公司 | Method for rapidly positioning grid + T tree index in mass data memory database |
CN1877573A (en) * | 2005-06-10 | 2006-12-13 | 华夏科技股份有限公司 | Multi-level database system structure |
-
2007
- 2007-06-01 CN CN2007101058902A patent/CN101315628B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1877573A (en) * | 2005-06-10 | 2006-12-13 | 华夏科技股份有限公司 | Multi-level database system structure |
CN1838124A (en) * | 2006-02-20 | 2006-09-27 | 南京联创科技股份有限公司 | Method for rapidly positioning grid + T tree index in mass data memory database |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104636349A (en) * | 2013-11-07 | 2015-05-20 | 阿里巴巴集团控股有限公司 | Method and equipment for compression and searching of index data |
CN104636349B (en) * | 2013-11-07 | 2018-05-22 | 阿里巴巴集团控股有限公司 | A kind of index data compression and the method and apparatus of index data search |
Also Published As
Publication number | Publication date |
---|---|
CN101315628A (en) | 2008-12-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101315628B (en) | Internal memory database system and method and device for implementing internal memory data base | |
CN106294190B (en) | Storage space management method and device | |
JP5589205B2 (en) | Computer system and data management method | |
JP2769100B2 (en) | Parallel tables for data models with inheritance | |
CN100583832C (en) | Data management method and system | |
US20170109378A1 (en) | Distributed pipeline optimization for data preparation | |
US7870122B2 (en) | Self-tuning index for flash-based databases | |
CN106708968A (en) | Distributed database system and data processing method in distributed database system | |
CN102243660A (en) | Data access method and device | |
EP1091295B1 (en) | Data management system using a plurality of data operation modules | |
CN117235183A (en) | Method and system for realizing time sequence database partition table in mass equipment scene | |
CN103870511A (en) | Shared memory-based information inquiring equipment and method | |
CN100399338C (en) | A sorting method of data record | |
CN108804571B (en) | Data storage method, device and equipment | |
CN116662019B (en) | Request distribution method and device, storage medium and electronic device | |
US6760713B2 (en) | Method, computer program product, and system for file and record selection utilizing a fuzzy data record pointer | |
CN104537023A (en) | Storage method and device for reverse index records | |
KR101368441B1 (en) | Apparatus, method and computer readable recording medium for reusing a free space of database | |
US9442948B2 (en) | Resource-specific control blocks for database cache | |
CN101751390B (en) | Disk allocation method for object-oriented storage device | |
CN118567577B (en) | Data access method and device based on distributed block storage and electronic equipment | |
CN117540056B (en) | Method, device, computer equipment and storage medium for data query | |
KR101170969B1 (en) | Data mapping method on sharing data base and data mapping system thereof | |
CN104133890B (en) | A kind of large data processing method in high in the clouds and system | |
Pollack et al. | Index Storage Fundamentals |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20110105 Termination date: 20150601 |
|
EXPY | Termination of patent right or utility model |