主权项 |
1. A Database method for a B+ tree having a predetermined B+ tree construction based on a processor executing instructions in a memory for processing data in a data storage space of a phase-change non-volatile random access memory (PRAM), comprising the operations of:
dividing the data storage space in each of a plurality of nodes of a B+ tree into an area 1 and an area 2, wherein each node includes a plurality of data records, a location which specifies the total number of data records in the node and a pointer to the location, and the area 1 and the area 2 each include a number of data records in the node, wherein the total number of records in area 1 and area 2 is equal to the total number of data records in the node; sequentially accessing said plurality of data records; and inserting, retrieving, and deleting a certain key value with respect to each of the sequentially accessed data records, and wherein the operation of inserting the key value inserts a new key value to the area 2 if the area 2 in the node is not in a full state, and moves a certain key value to the area 1 if the area 2 is in a full state; wherein the operation of retrieving the key value identifies whether the node is a leaf node, and sequentially retrieving the area 1 data records and the area 2 data records if the node is a leaf node, and if the node is not a leaf node, selecting an approximate key value among the key values from the area 1 and the area 2, moving the selected value to a record in the node below indicated by the key value, and repeating the operation of moving, until the node is a leaf node, and then, terminating the retrieving the key value; wherein the operation of deleting the key value merges area 1 data records and area 2 data records in the node, and deletes the key value in the merged node, wherein said executing modifies the B+ tree construction which reduces a number of write operations to said PRAM and minimizes a concentration of write operations to a certain area of said PRAM. |