Data query method and device
A data query and data technology, applied in the database field, can solve problems such as poor performance and low query efficiency, and achieve the effect of avoiding SQL statement error reporting and improving performance
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0036] figure 1 It is a flowchart of a data query method in an embodiment of the present invention, see figure 1 , the data query method of this embodiment is applied to the execution of the same transaction, including:
[0037] Step S11, receiving a data query request;
[0038] Step S12, obtaining the key data of the data to be queried in the query request from the corresponding common table of the database, the key data is at least data that can uniquely identify the data to be queried;
[0039] Step S13, creating a new transaction temporary table in the temporary table space of the database, and inserting key data of the data to be queried into the transaction temporary table;
[0040] Step S14, establishing a table connection between the temporary transaction table and the common table, and using the table connection to realize the query of the data to be queried. The table join here includes: equivalence join, left join or right join.
[0041] pass figure 1 In the me...
Embodiment 2
[0051] A specific example is that it is necessary to search for relevant invoice information in the sales order table of the database. For example, a sales order table stores 500 sales order records. Some of these sales orders have been invoiced, and some have not been invoiced. And if you want to query the relevant information of some invoices from these 500 sales records, when you use the in keyword of the existing SQL statement to perform enumeration query, the query efficiency is obviously very low.
[0052] The realization principle of the data query method of the present invention is: the invoice ID will be captured as temporary data from the invoice table recording the sales order records that have issued invoices in the sales order, and then create a temporary transaction table in the system memory, and execute Query the transaction, insert the temporary data invoice ID into the transaction temporary table, and then establish the table connection between the invoice tab...
Embodiment 3
[0113] image 3 It is a block diagram of a data query device according to an embodiment of the present invention, see image 3 , the data query device 30 includes:
[0114] A transaction execution unit 301, configured to receive a data query request;
[0115] The data obtaining unit 302 is used to obtain the key data of the data to be queried in the query request from the corresponding common table of the database, the key data is at least data that can uniquely identify the data to be queried; the key data obtained is sent to the data insertion unit 303 ;
[0116] The data insertion unit 303 is used to create a new transaction temporary table in the temporary table space of the database, and insert key data of the data to be queried into the transaction temporary table;
[0117] The query implementation unit 304 is configured to establish a table connection between the temporary transaction table and the common table, and use the table connection to realize the...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com