CN102708142A - Method and system for acquiring background data through structured query language (SQL) custom-made template - Google Patents

Method and system for acquiring background data through structured query language (SQL) custom-made template Download PDF

Info

Publication number
CN102708142A
CN102708142A CN2012100672122A CN201210067212A CN102708142A CN 102708142 A CN102708142 A CN 102708142A CN 2012100672122 A CN2012100672122 A CN 2012100672122A CN 201210067212 A CN201210067212 A CN 201210067212A CN 102708142 A CN102708142 A CN 102708142A
Authority
CN
China
Prior art keywords
sql
data
template
language
condition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2012100672122A
Other languages
Chinese (zh)
Other versions
CN102708142B (en
Inventor
严敏
李定福
高建国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING DIGITAL CHINA SI-TECH INFORMATION TECHNOLOGY Co Ltd
Original Assignee
BEIJING DIGITAL CHINA SI-TECH INFORMATION TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BEIJING DIGITAL CHINA SI-TECH INFORMATION TECHNOLOGY Co Ltd filed Critical BEIJING DIGITAL CHINA SI-TECH INFORMATION TECHNOLOGY Co Ltd
Priority to CN201210067212.2A priority Critical patent/CN102708142B/en
Publication of CN102708142A publication Critical patent/CN102708142A/en
Application granted granted Critical
Publication of CN102708142B publication Critical patent/CN102708142B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and a system for acquiring background data through a structured query language (SQL) custom-made template. The method comprises the specific operations comprising the following steps of: an SQL defining and analyzing module abstractly inputs SQL according to the service, and marks and analyzes the service in the SQL defining and analyzing module; a template semantization description module acquires metadata with corresponding indexes and conditions from a database through a specified database and the output data from the SQL defining and analyzing module so as to form a data acquisition template; and a data acquisition module selects data columns through the data acquisition template and sets the conditions of the acquired data through the user, executes the operation and acquires the data. The system comprises the SQL defining and analyzing module, the template semantization description module and the data acquisition module based on the template. The flexibility of the SQL is combined with the template, the metadata and the semantic description, and the workload of a technician and barrier in a communication link are effectively relieved.

Description

A kind of method and system that obtains back-end data through the SQL custom built forms
Technical field
The present invention is in the business application system field, through SQL (Structured Query Language) SQL definition template, provides the language of semantization to provide more intuitively, simply and flexibly obtain the mode of database data for the user.
Background technology
SQL is a SQL, and it is a kind of data base querying and programming language, is used to deposit obtain data and inquiry, renewal and administrative relationships Database Systems.
Conventional back-end data database data obtain manner is that the business personnel submits demand to, entrusts the technician to carry out data through database client and derives; This mode exists problems such as technician's dependence are high, promptness is low, the cycle is long; Obtain data if let the business personnel that is unfamiliar with SQL directly write SQL, need the long time of being familiar with and understanding on the one hand, also have more potential safety hazard simultaneously through client.
The present invention is through a kind of mode of compromise; The technician is through SQL definition template, and SQL is carried out the semantization translation, for the business personnel provides succinctly, intuitively and the language of businessization; Through system mask business personnel direct control database, but also can obtain the business datum that needs flexibly.
Summary of the invention
For realizing above-mentioned technique effect; The present invention proposes a kind ofly to obtain the system of back-end data through SQL (Structured Query Language) SQL custom built forms, comprising: SQL definition and parsing module, template semantization describing module, the data acquisition module that carries out based on template;
SQL definition and parsing module according to the abstract input sql like language of business, and carry out mark and parsing in SQL definition and parsing module;
Template semantization describing module through the output data of data designated storehouse and SQL definition and parsing module, is obtained index and condition metadata corresponding from database table, obtain template to form data;
Data acquisition module, the user obtains template through data and selects data rows and the condition of obtaining data is set, and the executable operations line data of going forward side by side obtains then.
Further, in SQL definition and parsing module, carry out mark and parsing is specially, condition field is carried out mark, system carries out grammatical analysis to sql like language, and sql like language is split as condition, index, grouping.
Further, wherein from database table, obtain in the process of index and condition metadata corresponding, also can revise relevant metadata in template semantization describing module.
Further, wherein metadata comprises type, length, description.
Further, wherein at data acquisition module, after the user selected data rows and setting to obtain data qualification through template, system rearranged SQL according to selected condition and index, forms final data storehouse language.
Further, said SQL definition and parsing module after the abstract input sql like language according to business, judge whether grammer is correct, if mistake then return is again re-entered sql like language.
In addition, the present invention also proposes a kind of the customization through SQL (Structured Query Language) SQL and touches the method that plate obtains back-end data, has following steps:
According to the abstract input sql like language of business, and in SQL definition and parsing module, carry out mark and parsing;
Through the output data of data designated storehouse and SQL definition and parsing module, from database table, obtain index and condition metadata corresponding, obtain template to form data;
The user obtains template through data and selects data rows and the condition of obtaining data is set, and the executable operations line data of going forward side by side obtains then.
Further, carry out mark and parsing and be specially, condition field is carried out mark, system carries out grammatical analysis to sql like language, and sql like language is split as condition, index, grouping.
Further, from database table, obtain in the process of index and condition metadata corresponding, also can revise relevant metadata.
Further, wherein metadata comprises type, length and description.
Further, after the user selected data rows and setting to obtain data qualification through template, system rearranged SQL according to selected condition and index, forms final data storehouse language.
Further, after abstract input sql like language, judge whether grammer is correct, if mistake then return is again re-entered sql like language according to business.
Description of drawings
Fig. 1 obtains the process flow diagram of template for definition of data provided by the invention.
Fig. 2 obtains the process flow diagram that template is obtained data for provided by the invention through data.
Fig. 3 is the software operation surface chart through the SQL definition module provided by the invention.
Fig. 4 is the software operation surface chart that carries out semantization definition and classification provided by the invention.
Fig. 5 is the software operation surface chart that carries out semantization-metadata processing provided by the invention.
Fig. 6 is the software operation surface chart that obtains data according to template provided by the invention.
Embodiment
Data acquisition module three parts that the present invention mainly carries out by SQL definition and parsing module, template semantization describing module, based on template are formed; SQL definition and parsing module, the technician is according to the abstract input sql like language of business, and in SQL definition and parsing module, condition field carried out mark, and system carries out grammatical analysis to sql like language, and sql like language is split as condition, index, grouping; Template semantization describing module; Output data through data designated storehouse and SQL definition and parsing module; From database table, obtain index and condition metadata corresponding, in this process, stencil design personnel also can revise relevant metadata; The main containing type of metadata, length, description etc. are obtained template to form data; Data acquisition module, the user obtains template through data and selects data rows and the condition of obtaining data is set, and system regenerates the sql like language that is used to obtain data according to selected condition and index, forms final data storehouse language, carries out the line data of going forward side by side and obtains.
Fig. 1 is the process flow diagram that definition of data provided by the invention obtains template, and said flow process is following:
Step 1: according to the abstract input sql like language of business;
Step 2: the sql like language to input carries out syntax check;
Step 3: whether the grammer of sql like language of judging input is correct, if mistake then return step 1, if would correctly continue to carry out following steps;
Step 4: condition field is carried out mark, and system carries out grammatical analysis to sql like language;
Step 5: business datum is split and separate according to the index condition;
Step 6: from database table, obtain index and condition metadata corresponding;
Step 7: metadata is carried out related amendments;
Step 8: form data and obtain template.
The present invention obtains the flow process of template through above-mentioned data; Through SQL definition and parsing module; Sql like language according to input has obtained output data; Through template semantization describing module, the output data according to data designated storehouse and SQL definition and parsing module has formed data at last and has obtained template again.
Below, the related procedure of accompanying drawing 2 is once described.
Fig. 2 obtains the process flow diagram that template is obtained data for provided by the invention through data, and said flow process is following:
Step 1: the user obtains template through data and selects data rows;
Step 2: the user obtains template through data the condition that data are obtained is set;
Step 3: the user carries out rule setting according to time scheduling;
Step 4: carry out rule and trigger;
Step 5: system regenerates the sql like language that is used to obtain data according to selected condition and index, forms final data storehouse language;
Step 6: system's executable operations is also obtained data;
Step 7: process ends.
In addition, SQL resolves and supports basic SQL, comprises join, basic function, asterisk wildcard, operational symbol etc., and when meta data definition, manual definition supports field type, field to show that type, data dictionary are bound, the data field cascade; These metadata are set to that SQL obtains that the data front end shows and backstage SQL generates the basis is provided, and carry out the linking that the user obtains entry condition and backstage through system;
1, through SQL definition template, its software operation interface is as shown in Figure 3.
2, support field carried out that semantization is described and classification: the software operation interface of field being carried out semantization-definition and classification is as shown in Figure 4, and it is as shown in Figure 5 that field is carried out the software operation interface of semantization-metadata processing.
3, the business personnel obtains data according to template, and its software operation interface is as shown in Figure 6.
Dirigibility combination template, metadata and semantic description as SQL; The skill image of can only the technician grasping offer the business personnel; Increase work efficiency, in the promptness, effectively mitigation technique personnel's the workload and the obstacle of communication link improve enterprises production efficiency;
The above is merely preferred embodiment of the present invention, and is in order to restriction the present invention, not all within spirit of the present invention and principle, any modification of being done, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (12)

1. one kind is obtained the system of back-end data through SQL (Structured Query Language) SQL custom built forms, it is characterized in that comprising: SQL definition and parsing module, template semantization describing module, the data acquisition module that carries out based on template;
SQL definition and parsing module according to the abstract input sql like language of business, and carry out mark and parsing in SQL definition and parsing module;
Template semantization describing module through the output data of data designated storehouse and SQL definition and parsing module, is obtained index and condition metadata corresponding from database table, obtain template to form data;
Data acquisition module, the user obtains template through data and selects data rows and the condition of obtaining data is set, and the executable operations line data of going forward side by side obtains then.
2. obtain the system of back-end data according to claim 1 through the SQL custom built forms; In SQL definition and parsing module, carry out mark and parsing is specially; Condition field is carried out mark, and system carries out grammatical analysis to sql like language, and sql like language is split as condition, index, grouping.
3. obtain the system of back-end data as claim 2 is said through the SQL custom built forms, wherein from database table, obtain in the process of index and condition metadata corresponding, also can revise relevant metadata in template semantization describing module.
4. obtain the system of back-end data like claim 3 through the SQL custom built forms, wherein metadata comprises type, length, description.
5. like the said system that obtains back-end data through the SQL custom built forms of claim 4; Wherein at data acquisition module; After the user selected data rows and setting to obtain data qualification through template, system rearranged SQL according to selected condition and index, forms final data storehouse language.
6. obtain the system of back-end data according to claim 1 through the SQL custom built forms, said SQL definition and parsing module after the abstract input sql like language according to business, judge whether grammer is correct, if mistake then return is again re-entered sql like language.
7. touch the method that plate obtains back-end data through SQL (Structured Query Language) SQL customization for one kind, it is characterized in that having following steps:
According to the abstract input sql like language of business, and in SQL definition and parsing module, carry out mark and parsing;
Through the output data of data designated storehouse and SQL definition and parsing module, from database table, obtain index and condition metadata corresponding, obtain template to form data;
The user obtains template through data and selects data rows and the condition of obtaining data is set, and the executable operations line data of going forward side by side obtains then.
8. obtain the method for back-end data as claim 7 is said through the SQL custom built forms, carry out mark and parsing and be specially, condition field is carried out mark, system carries out grammatical analysis to sql like language, and sql like language is split as condition, index, grouping.
9. obtain the method for back-end data as claim 8 is said through the SQL custom built forms, from database table, obtain in the process of index and condition metadata corresponding, also can revise relevant metadata.
10. obtain the method for back-end data as claim 9 is said through the SQL custom built forms, wherein metadata comprises type, length and description.
11. obtain the method for back-end data as claim 10 is said through the SQL custom built forms, after the user selected data rows and setting to obtain data qualification through template, system rearranged SQL according to selected condition and index, formation final data storehouse language.
12. obtain the method for back-end data through the SQL custom built forms, after abstract input sql like language, judge whether grammer is correct, if mistake then return is again re-entered sql like language according to business as claim 7 is said.
CN201210067212.2A 2012-03-14 2012-03-14 Method and system for acquiring background data through structured query language (SQL) custom-made template Active CN102708142B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210067212.2A CN102708142B (en) 2012-03-14 2012-03-14 Method and system for acquiring background data through structured query language (SQL) custom-made template

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210067212.2A CN102708142B (en) 2012-03-14 2012-03-14 Method and system for acquiring background data through structured query language (SQL) custom-made template

Publications (2)

Publication Number Publication Date
CN102708142A true CN102708142A (en) 2012-10-03
CN102708142B CN102708142B (en) 2014-04-02

Family

ID=46900912

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210067212.2A Active CN102708142B (en) 2012-03-14 2012-03-14 Method and system for acquiring background data through structured query language (SQL) custom-made template

Country Status (1)

Country Link
CN (1) CN102708142B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103473306A (en) * 2013-09-10 2013-12-25 北京思特奇信息技术股份有限公司 Method and system for adopting structured query language (SQL) mark substitution method to achieve data self-extraction
CN103559586A (en) * 2013-11-15 2014-02-05 拉卡拉支付有限公司 Report document management device, system and method
CN104021225A (en) * 2014-06-25 2014-09-03 郑州向心力通信技术股份有限公司 Packet data search and grasp algorithm
CN106980921A (en) * 2017-03-02 2017-07-25 上海歌略软件科技有限公司 A kind of self-defined risk analysis method
CN107798035A (en) * 2017-04-10 2018-03-13 平安科技(深圳)有限公司 A kind of data processing method and terminal
CN108920638A (en) * 2018-07-02 2018-11-30 山东浪潮商用系统有限公司 Web terminal data collector file method and device based on data dictionary configuration
CN108984623A (en) * 2018-06-14 2018-12-11 东软集团股份有限公司 Data query conditions generation method, device, storage medium and electronic equipment
CN111552698A (en) * 2020-04-21 2020-08-18 重庆富民银行股份有限公司 SQL version control system and method for solving environmental difference
CN112817964A (en) * 2019-11-15 2021-05-18 广东电网有限责任公司云浮供电局 Index billboard design and development system based on process robot

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008077632A (en) * 2006-08-21 2008-04-03 Ricoh Co Ltd Metadata customizing method
CN101344881A (en) * 2007-07-09 2009-01-14 中国科学院大气物理研究所 Index generation method and device and search system for mass file type data
CN101997732A (en) * 2009-08-14 2011-03-30 华为技术有限公司 Method, device and system for inquiring service
CN102193922A (en) * 2010-03-04 2011-09-21 杭州华三通信技术有限公司 Method and device for accessing database

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008077632A (en) * 2006-08-21 2008-04-03 Ricoh Co Ltd Metadata customizing method
CN101344881A (en) * 2007-07-09 2009-01-14 中国科学院大气物理研究所 Index generation method and device and search system for mass file type data
CN101997732A (en) * 2009-08-14 2011-03-30 华为技术有限公司 Method, device and system for inquiring service
CN102193922A (en) * 2010-03-04 2011-09-21 杭州华三通信技术有限公司 Method and device for accessing database

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103473306A (en) * 2013-09-10 2013-12-25 北京思特奇信息技术股份有限公司 Method and system for adopting structured query language (SQL) mark substitution method to achieve data self-extraction
CN103559586A (en) * 2013-11-15 2014-02-05 拉卡拉支付有限公司 Report document management device, system and method
CN103559586B (en) * 2013-11-15 2017-07-21 拉卡拉支付股份有限公司 A kind of report document management, system and method
CN104021225A (en) * 2014-06-25 2014-09-03 郑州向心力通信技术股份有限公司 Packet data search and grasp algorithm
CN104021225B (en) * 2014-06-25 2017-12-05 郑州向心力通信技术股份有限公司 Packet type data search extracting method
CN106980921A (en) * 2017-03-02 2017-07-25 上海歌略软件科技有限公司 A kind of self-defined risk analysis method
CN107798035A (en) * 2017-04-10 2018-03-13 平安科技(深圳)有限公司 A kind of data processing method and terminal
WO2018188539A1 (en) * 2017-04-10 2018-10-18 平安科技(深圳)有限公司 Data processing method, terminal, device, and storage medium
CN108984623A (en) * 2018-06-14 2018-12-11 东软集团股份有限公司 Data query conditions generation method, device, storage medium and electronic equipment
CN108984623B (en) * 2018-06-14 2020-11-03 东软集团股份有限公司 Data query condition generation method and device, storage medium and electronic equipment
CN108920638A (en) * 2018-07-02 2018-11-30 山东浪潮商用系统有限公司 Web terminal data collector file method and device based on data dictionary configuration
CN112817964A (en) * 2019-11-15 2021-05-18 广东电网有限责任公司云浮供电局 Index billboard design and development system based on process robot
CN112817964B (en) * 2019-11-15 2022-02-11 广东电网有限责任公司云浮供电局 Index billboard design and development system based on process robot
CN111552698A (en) * 2020-04-21 2020-08-18 重庆富民银行股份有限公司 SQL version control system and method for solving environmental difference

Also Published As

Publication number Publication date
CN102708142B (en) 2014-04-02

Similar Documents

Publication Publication Date Title
CN102708142B (en) Method and system for acquiring background data through structured query language (SQL) custom-made template
CN104123374B (en) The method and device of aggregate query in distributed data base
CN104199831B (en) Information processing method and device
CN103744891B (en) A kind of data query method and system
CN102682118B (en) Multidimensional data model access method and device
CN106528512B (en) A kind of EXCEL preliminary budget table automatic editing method
CN107111639B (en) Building reports
CN102609451A (en) SQL (structured query language) query plan generation method oriented to streaming data processing
CN104133772A (en) Automatic test data generation method
CN108694214A (en) Generation method, generating means, readable medium and the electronic equipment of data sheet
CN106547729B (en) A kind of dynamic creation method and system of data sheet
CN103093000A (en) Database query modeling system and database query modeling method
CN109446221A (en) A kind of interactive data method for surveying based on semantic analysis
CN103412868A (en) Method and device for generating document
US20120296862A1 (en) Method and apparatus for analyzing and migrating data integration applications
CN103077192B (en) A kind of data processing method and system thereof
CN109684616A (en) Dynamic statement formula assembles the method and system made a report on
CN104461531A (en) Implementing method for self-defined functions of reporting system
CN102722537A (en) Database test data generation method and system thereof
CN105975489A (en) Metadata-based online SQL code completion method
CN105224633A (en) Based on solr querying method and the device of sql like language
CN109299074A (en) A kind of data verification method and system based on templating data base view
CN109739882A (en) A kind of big data enquiring and optimizing method based on Presto and Elasticsearch
CN107729428A (en) A kind of SQL query method based on Presto and Elasticsearch
CN103279356B (en) The automatic generation method and device of Makefile file

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: 100085 Haidian District, Zhongguancun, South Street, No. 6,, building information, floor, No. 16

Applicant after: SI-TECH Information Technology Ltd.

Address before: 100085 Haidian District, Zhongguancun, South Street, No. 6,, building information, floor, No. 16

Applicant before: Beijing Digital China SI-TECH Information Technology Co., Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: BEIJING DIGITAL CHINA SI-TECH INFORMATION TECHNOLOGY LTD. TO: BEIJING SI-TECH INFORMATION TECHNOLOGY LTD.

C14 Grant of patent or utility model
GR01 Patent grant