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


