Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and device for creating tables, saving records and deleting records for embedded system database

An embedded system and database technology, applied in the direction of electrical digital data processing, special data processing applications, instruments, etc., can solve the problems of invariable length and low utilization of storage space, and achieve the effect of solving complex algorithms and improving data processing efficiency

Active Publication Date: 2013-12-04
ZTE CORP
View PDF3 Cites 16 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

If the data is read sequentially, then this method is simple and efficient, but if the record query service is required (for example, the user wants to query the records of a certain period of time), and the amount of data is relatively large, it can only be realized through complex algorithms Inquire
In short, this method requires complex algorithms to realize the query function, and each storage unit is set according to the maximum amount of data, which cannot be variable in length, and the storage space utilization is low
[0004] Although many databases currently support variable-length data storage and have powerful query functions, unfortunately most of the current database systems cannot directly realize the function of data cycle coverage and preservation

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 creating tables, saving records and deleting records for embedded system database
  • Method and device for creating tables, saving records and deleting records for embedded system database
  • Method and device for creating tables, saving records and deleting records for embedded system database

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0061] This embodiment introduces the method for creating table in the embedded system database, as figure 1 shown, including the following steps 110-130:

[0062] Step 110, create a record table for each type of record, each record table includes a newness identification field, and the newness identification is used to identify the newness of each record;

[0063] The class of records is distinguished by the types of records that the system needs to save;

[0064] The newness and oldness identification field is, for example, the record serial number field. It can be set that the smaller the record serial number is, the earlier the record is, and the older the record is. The larger the record serial number is, the newer the record is. The record with the smallest serial number in the record table is the oldest record. The largest record is the newest record;

[0065] Step 120, assigning the maximum number of records for each record table;

[0066] Specifically, allocate the...

Embodiment 2

[0075] This embodiment introduces the method for storing records in the embedded system database table created above, such as Figure 4 As shown, including the following steps 210-240:

[0076] Step 210, when storing the record to be stored into the record table, read the current record quantity of the record table from the index table corresponding to the record table;

[0077] Step 220, judging whether the record table is full according to the current record quantity, if it is not full, execute step 230, if it is full, execute step 240;

[0078] Specifically, it is judged whether the current record quantity is greater than or equal to the maximum record quantity of the record table, if yes, it means that it is full, if not, it means it is not full.

[0079] Step 230, write the record to be stored into the record table as a new record, and update the old and new record information and the current record quantity of the record table in the index table;

[0080] The new and o...

Embodiment 3

[0097] This embodiment introduces the method for deleting records in the embedded system database table created above, such as Figure 8 As shown, including the following steps 310-320:

[0098] Step 310, delete records in the record table;

[0099] The recording table described here is the recording table created in Embodiment 1.

[0100] Step 320, updating the current number of records in the index table.

[0101] The index table described here is the index table created in Embodiment 1.

[0102]Preferably, in step 310, if the non-oldest and non-latest records in the record table are deleted, only the current number of records in the index table needs to be updated. If the deleted record includes the oldest record and / or the newest record in the record table, then update the old and new record information in the index table, for example, correspondingly update the oldest record identifier and / or the latest record identifier in the index table.

[0103] In short, when del...

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 method and a device for creating tables, saving records and deleting records for an embedded system database. By the aid of the method and the device, data processing efficiency of the embedded system database is improved. The method for saving the records includes: when a to-be-saved record is saved in a record table, reading the number of current records of the record table from an index table corresponding to the record table; judging whether the record table is full or not according to the number of the current records, if not, writing the to-be-saved record, as a new record, into the record table and updating new and old record information and the number of the current records of the record table in the index table, if so, finding the old record according to the new and old record information of the record table in the index table, covering the old record with the to-be-saved record and updating the new and old record information of the record table in the index table. The device for saving the records comprises a reading module, a judging module, a non-full processing module and a fullness processing module. By the aid of the method and the device, data processing efficiency is improved, and the problem of complexity in a query algorithm is solved.

Description

technical field [0001] The invention relates to an embedded system, in particular to an embedded system database data processing method (including creating a table, storing a record, deleting a record) and a corresponding device. Background technique [0002] With the continuous development of computer technology and the improvement of people's living standards, more and more electronic products such as industrial control, medical treatment, communication, and consumption are becoming increasingly intelligent, and embedded monitoring systems with microprocessors as the core are increasingly widely used. . In order to better understand the operating status of the equipment, the monitoring system needs to collect a large amount of operating parameter data and present these data to the user. At the same time, the monitoring system also needs to provide the user with a large amount of historical data so that the user can better understand the operation of the equipment. Regular...

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 & Authority Applications(China)
IPC IPC(8): G06F17/30
Inventor 潘奇银
Owner ZTE CORP
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products