Abstract:
Embodiments of the present application provide methods for updating a data table of a KeyValue database, including: receiving a full data updating instruction, acquiring to-be-imported data according to the full data updating instruction, and generating a full data updating file according to the to-be-imported data; acquiring M rows of old data in a data table corresponding to the full data updating instruction, and generating a full data deleting file according to M RowKeys of the M rows of old data; importing the full data updating file into the data table; and importing the full data deleting file into the data table. According to the present application, full updating of a data table of a KeyValue database can be implemented, and an updating speed is fast and atomicity is better. The embodiments of the present invention further provide a related apparatus for updating table data.
Abstract:
A data storage method and apparatus. The method includes: determining a same column attribute of at least two data objects that are to be stored in a KeyValue type distributed database; determining a format of a row identifier of each data object of the at least two data objects, where the row identifier format includes the same column attribute and a data object identifier; determining a row identifier value of each data record of each data object according to the determined row identifier format of each data object; and storing each data record and the row identifier value of each data record, where the row identifier value of each data record is used as a primary index. The data storage method and apparatus in embodiments of the present invention can improve data query efficiency.