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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


