Method and device for generating SQL (Structured Query Language) statement, computer equipment and storage medium
A computer program and statement technology, applied in the database field, can solve problems such as low efficiency, and achieve the effect of improving efficiency and reducing workload
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0048] see figure 1 , a method for generating an SQL statement in this embodiment, comprising the following steps:
[0049] S1. Extract rule information in the database according to preset rules, the rule information includes table name and rule data, parse the rule information, and obtain the table name and the rule data.
[0050]In one embodiment, the database includes at least one piece of rule information, the rule information is text information representing business rules configured according to business requirements, the table name refers to the name of the table involved in the above business rules, and the rule data is Text information representing the specific content of the above business rules. Take the employee payment schedule stored in the medical insurance database as an example: the rule information is "the personnel category of the employee payment schedule can only be active, retired, retired, and old Red Army". Among them, the table name is "employee paym...
Embodiment 2
[0104] see image 3 , an apparatus 1 for generating SQL statements in this embodiment includes: an analysis unit 11 , a processing unit 12 , a determination unit 13 and a generation unit 14 .
[0105] The parsing unit 11 is configured to extract rule information in the database according to preset rules, the rule information includes table names and rule data, parse the rule information, and obtain the table names and the rule data.
[0106] Wherein, the database includes at least one piece of rule information. The preset rule is a kind of extraction rule, and the rule can extract the rule information in the database one by one according to the order of the first letters in the rule information, or other preset or random order. The rule data includes field data, or field data and dictionary data.
[0107] The above rule information can also be stored in a server, which can be an independent server, or provide cloud services, cloud databases, cloud computing, cloud functions,...
Embodiment 3
[0145] In order to achieve the above object, the present invention also provides a kind of computer equipment 2, and this computer equipment 2 comprises a plurality of computer equipment 2, and the component part of the device 1 that generates SQL statement of embodiment 2 can be dispersed in different computer equipment 2, and computer equipment The device 2 can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server or a cabinet server (including an independent server, or a server cluster composed of multiple servers) for executing programs. )Wait. The computer device 2 of this embodiment at least includes but is not limited to: a memory 21, a processor 23, a network interface 22, and a device 1 for generating SQL statements that can be connected to each other through a system bus (refer to Figure 4 ). It should be pointed out that, Figure 4 Only the computer device 2 is shown with components - but it sh...
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