Unlock instant, AI-driven research and patent intelligence for your innovation.

A method and device for querying data

A technology for querying data and data, applied in the field of querying data, can solve problems such as inflexibility, taking up a large space, affecting storage and query efficiency, etc., and achieve the effects of reducing storage space, flexible composition, and improving storage efficiency and query speed

Active Publication Date: 2021-04-30
BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This method is not flexible enough. It can only estimate the maximum number of digits in the field to determine the length of the padding. Once the number of digits in the field exceeds the length of the padding, you need to redesign the primary key and re-store the data; if you directly design a larger field length, invalid data such as "0" used for filling will take up a lot of space, affecting storage and query efficiency

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
  • A method and device for querying data
  • A method and device for querying data
  • A method and device for querying data

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0079] Exemplary embodiments of the present invention are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present invention to facilitate understanding, and they should be regarded as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.

[0080] figure 1 is a schematic diagram of main steps of a method for querying data according to an embodiment of the present invention.

[0081] Such as figure 1 As shown, the method for querying data provided by one embodiment of the present invention includes:

[0082] S100, constructing a primary key of data, and establishing a corresponding relationship between the ...

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 querying data, and relates to the technical field of computers. A specific implementation of the method includes: constructing a primary key of data, and establishing a corresponding relationship between the primary key and the data; wherein, the primary key includes a length field and a query field that are adjacently set in sequence, and the length field is used for Identify the number of characters of the query field; when receiving a request including a query keyword, determine the primary key that satisfies the query condition by comparing the query keyword and the primary key; obtain the data corresponding to the primary key that satisfies the query condition as the query result. In this embodiment, the query function can be implemented without filling the fields of the primary key, thereby improving the storage and query efficiency of the database.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a method and device for querying data. Background technique [0002] A database is a warehouse built on a computer storage device that organizes, stores and manages data according to the data structure. In order to facilitate the query of specific data in the database, a primary key is usually set for each piece of data; the primary key refers to a field or a combination of multiple fields in the data table, and its value can uniquely identify each row in the data table, through Retrieving the primary key can query the corresponding data, so as to obtain, delete, modify and other operations on the data in the database. [0003] The existing common way to form a primary key is to fill the length of the same field in the primary key of each piece of data to the same length, usually by adding "0" before the actual content of the field, so that the key in the specified interval ca...

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 Patents(China)
IPC IPC(8): G06F16/2453G06F16/22
CPCG06F16/2282G06F16/2453
Inventor 白杨
Owner BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD