Database record maintenance method and apparatus

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

Active Publication Date: 2018-01-19
北京百分点科技集团股份有限公司
View PDF5 Cites 7 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
  • Database record maintenance method and apparatus
  • Database record maintenance method and apparatus
  • Database record maintenance method and apparatus

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0098] figure 2 For a schematic flowchart of a method for maintaining database records provided in Example 1 of the present 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, and the following descriptions are made by taking a distributed database as an example. 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 columns consist of id, name, 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...

Embodiment 2

[0117] Figure 4 It is a schematic flowchart of a method for maintaining database records provided by Embodiment 2 of the present application. The embodiment of the present application includes all the content described 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 deletion table corresponding to the base table;

[0119] Step 44, writing the updated third record of the second record in the base table;

[0120] Step 46, revise the effective length of the corresponding record 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 Indicates the number of valid records in the corresponding table.

[0121] see F...

Embodiment 3

[0131] Figure 6 It is a schematic flowchart of a method for maintaining database records provided by Embodiment 3 of this application. This embodiment includes all the content disclosed in Embodiment 1 and / or Embodiment 2, and also includes query operations. See Figure 6 , the query operation specifically includes the following steps:

[0132] Step 62, determine the query operation for the records in the base table of the database, the query operation carries query conditions;

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

[0134] Step 64, determine the record in the base table of the database that matches the query condition and whose record identification is not in the deletion table, and ou...

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] The present application relates to the technical field of databases, in particular to a method and device for maintaining database records. Background technique [0002] Hadoop is currently the mainstream big data distributed storage and computing platform. It consists 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 of writing once and reading many times, which 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 in file operations. For example, it only supports the append operation of files. There is still a gap with the traditional file model in the access and concurrent writing of small files, and it does not support random modification of files. The limitation that HDFS do...

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 & AuthorityApplications(China)
IPC IPC(8): G06F17/30
Inventor高体伟刘国栋崔凯峰张鹏程胡秀龙冀邢亮周军杨培表杨化龙
Owner北京百分点科技集团股份有限公司