Method and device for maintaining database records

A database and recording technology, applied in the database field, can solve the problem of low efficiency of modifying records

Active Publication Date: 2020-07-28
北京百分点科技集团股份有限公司
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The embodiment of the present application provides a method and device for maintaining database records, which are used to solve the problem of low efficiency of modifying records in existing technical solutions

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for maintaining database records
  • Method and device for maintaining database records
  • Method and device for maintaining database records

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0098] figure 2 For a flowchart of a method for maintaining database records provided in Example 1 of this application, see figure 2 , The method includes the following steps:

[0099] Step 22: According to the delete operation on the first record in the base table of the database, add the identifier of the first record in the delete table corresponding to the base table;

[0100] It should be noted that the database here may be a distributed database, and correspondingly, the base table may be a data table of a non-relational distributed database. The following are examples of distributed databases. The data source of the distributed database can be a table, etc., where the columns in the table are characters and behavior records. Take the student table as an example. The column consists of id, name, and gender. The field refers to id or name or gender. In other words: id is a field; name is also a field; gender is also a field. A record is a unit of rows in the table, and a...

Embodiment 2

[0117] Figure 4 This is a schematic flowchart of a method for maintaining a database record provided in Embodiment 2 of this application. The embodiment of this application includes all the content recorded in Embodiment 1, and also includes the relevant steps of the update operation, as follows:

[0118] Step 42: According to the update operation on the second record in the base table of the database, add the identifier of the second record in the delete table corresponding to the base table;

[0119] Step 44: Write the updated third record of the second record in the base table;

[0120] Step 46: Modify the effective length of the corresponding records in the metadata table of the base table and the deletion table corresponding to the base table. The metadata table is used to store the effective length of the base table and the deletion table, and the effective length is used To indicates the number of valid records in the corresponding table.

[0121] See Figure 5 , There are rec...

Embodiment 3

[0131] Image 6 A schematic flowchart of a method for maintaining database records provided in Embodiment 3 of this application. This embodiment includes all the contents disclosed in Embodiment 1 and / or Embodiment 2, and also includes query operations, see Image 6 , The query operation specifically includes the following steps:

[0132] Step 62: Determine a query operation for records in the base table of the database, where the query operation carries query conditions;

[0133] It should be noted that the user can query related records in the distributed database through the input device. The query conditions can be for example: query whether there is a related record of "A" in the first data storage unit, or whether there is a "A" in the entire distributed database B" related records.

[0134] Step 64: Determine a record in the base table of the database that matches the query condition and the record identifier is not in the deletion table, and output the query result;

[0135] I...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a database record maintenance method and apparatus. The method comprises the steps of adding an identifier of a first record to a deletion table corresponding to a base table according to deletion operation on the first record in the base table of a database; and modifying effective length of corresponding records, in a metadata table, of the deletion table corresponding tothe base table, wherein the metadata table is used for storing effective lengths of the base table and the deletion table, and the effective lengths are used for representing effective record numbersof the corresponding tables. The corresponding deletion table is configured for the base table of the database; when deletion and updating operations are executed on the records in the base table, the identifiers of the deleted records are written in the deletion table; and the effective lengths, stored in the metadata table, of the base table and the deletion table are updated to finish record modification operation. Compared with the prior art, the method and the apparatus have the advantages that the record modification efficiency can be effectively improved, so that the record managementefficiency is improved.

Description

Technical field [0001] This application relates to the field of database technology, and in particular to a method and device for maintaining database records. Background technique [0002] Hadoop Haidupu is currently the mainstream big data distributed storage and computing platform. It is composed of HDFS distributed file system, Map-Reduce distributed processing framework and YARN resource management framework. Among them, the HDFS distributed file system is oriented to large data sets, and implements a file access model that writes once and reads multiple times, and solves the problems of high data throughput and high reliability in big data scenarios. [0003] But at the same time it also brings some limitations on file operations, such as only supporting file Append addition operations, there is still a gap with the traditional file model in the access and concurrent writing of small files, and random modification of files is not supported. The limitation that HDFS does not...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & AuthorityPatents(China)
IPC IPC(8): G06F16/22G06F16/23G06F16/27G06F16/182
Inventor高体伟刘国栋崔凯峰张鹏程胡秀龙冀邢亮周军杨培表杨化龙
Owner北京百分点科技集团股份有限公司