CN113127518A - Method for flexibly inquiring data - Google Patents
Method for flexibly inquiring data Download PDFInfo
- Publication number
- CN113127518A CN113127518A CN202110472869.6A CN202110472869A CN113127518A CN 113127518 A CN113127518 A CN 113127518A CN 202110472869 A CN202110472869 A CN 202110472869A CN 113127518 A CN113127518 A CN 113127518A
- Authority
- CN
- China
- Prior art keywords
- query
- service
- tables
- data
- flexibly
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 24
- 238000004458 analytical method Methods 0.000 claims abstract description 10
- 230000001360 synchronised effect Effects 0.000 claims abstract description 6
- 230000003068 static effect Effects 0.000 claims abstract description 5
- 238000010586 diagram Methods 0.000 claims description 9
- 238000004364 calculation method Methods 0.000 claims description 6
- 238000012163 sequencing technique Methods 0.000 claims description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/248—Presentation of query results
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/258—Data format conversion from or to a database
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method for flexibly inquiring data, which comprises the following steps: s1, establishing data source management; s2, synchronizing the data table view structure of the service system to a temporary library in data source management, and performing grouping classification according to the tables, and setting service labels and table remarks; s3, establishing a service group, and adding a service query model in the group; s4, displaying the list according to the service classification for the user to use; s5, switching the query mode into a chart to perform secondary processing analysis; and S6, downloading the query result to the local in a static picture or Excel table form. The invention manages the data source connection of the service system, does not affect the efficiency of the original library through the mode from a synchronous structure to a temporary library, establishes a service model by combining a plurality of tables, automatically finds the association relation during query, freely assembles query conditions and fields so as to flexibly query required data, and then converts and displays the query result by utilizing an ECharts chart control, thereby solving the problems of cross-table query and difficult data use.
Description
Technical Field
The invention belongs to the field of computer software application, and particularly relates to a method for flexibly querying data.
Background
Data of a business system in the enterprise production process are always generated respectively, query cannot be realized if conversion is not achieved through technical means, a traditional query mode is that a report is made according to fixed business, the mode is relatively fixed, business cannot be flexibly changed, business personnel without program knowledge cannot operate the business personnel by themselves, and cost is relatively high.
Therefore, a flexible query mode is needed to solve the problem of difficult query, data sources of a service system are connected and managed, the efficiency of an original library is not affected by a mode from a synchronous structure to a temporary library, a multi-table combined service model is established, association relations are automatically found during query, query conditions are freely assembled, fields can flexibly query required data, the problem of difficult data use due to cross-table query is solved, query results can be secondarily processed, the fields are aggregated and summarized according to the query conditions, and required chart controls are flexibly selected in groups to perform chart conversion.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provide a method for inquiring data, which manages the data source connection of a service system, does not influence the efficiency of an original library through a mode of synchronizing a structure to a temporary library, establishes a service model by combining multiple tables and solves the problems of cross-table inquiry and difficult data use.
The purpose of the invention is realized by the following technical scheme: a method for flexibly querying data, comprising the steps of:
s1, establishing data source management, connecting the database of the system through JDBC mode, and connecting the service system data source in the database to the address registration system;
s2, synchronizing the data table view structure of the service system to a temporary library in data source management, and performing grouping classification according to the tables, and setting service labels and table remarks;
s3, establishing service groups, adding a service query model in the groups, selecting needed tables from the S2 group classification, setting the relationship among the tables, and finally forming the service query model;
s4, displaying the set table according to the service classification for the user to use;
s5, switching the query mode into a chart for secondary processing analysis, bringing the query result into chart analysis, dragging the field to a longitudinal axis and a transverse axis, setting a calculation mode and a sorting mode on the longitudinal axis, and selecting a chart control for analysis;
and S6, downloading the query result to the local in a static picture or Excel table form.
Further, the specific implementation method of step S1 is as follows: when connection needs to be established, a database connection address, a database name, a database account number and a password are set, a database type is selected, a program is spliced into a connection character string according to the database type and is connected to the database through JDBC driving.
Further, the specific implementation method of step S2 is as follows: in order to flexibly configure multi-table view association and better express services, a data table view structure in a data source needs to be synchronized to a temporary library, tables are grouped and classified according to a service system, the tables are displayed according to a hierarchical structure, and service labels are written on the tables for remarking and facilitating query.
Further, the specific implementation method of step S3 is as follows: selecting a plurality of tables from a data source, wherein the first table is a main table, the other tables are auxiliary tables, selecting any field of the tables for association, the association relationship comprises inner connection, left outer connection, right outer connection and full outer connection, setting the table name at the same time, and finally saving the table name as a query model.
Further, the specific implementation method of step S4 is as follows: when a service person selects a table or inquires through a service tag search table, the system reads the table with the relationship highlighted by automatic association of the configuration of the inquiry model, the service person selects a whole table or partial fields to input inquiry condition values as required, selects conditions of increment, and or to carry out inquiry, and automatically stores the inquiry as an inquiry template.
Further, the specific implementation method of step S5 is as follows: and splicing the selected table, longitudinal axis and transverse axis fields, calculation modes and sequencing modes into SQL sentences by using a pie chart, a broken line chart, a column chart, a scatter diagram, a rose diagram, a table or an area diagram of the open source chart plug-in ECharts, transmitting the SQL sentences to a database for query through JDBC connection, and converting the data query into a JSON format and transmitting the JSON format to an ECharts chart control for display.
The invention has the beneficial effects that: the invention manages the data source connection of the service system, does not affect the efficiency of the original library through the mode from a synchronous structure to a temporary library, establishes a service model by multi-table combination, automatically finds the association relation during query, freely assembles query conditions and fields so as to flexibly query required data, and then converts and displays the query result by utilizing an ECharts chart control, thereby solving the problems of cross-table query and difficult data use and being capable of flexibly realizing data query.
Drawings
FIG. 1 is a flow chart of a method of flexibly querying data of the present invention.
Detailed Description
The technical scheme of the invention is further explained by combining the attached drawings.
As shown in FIG. 1, the method for flexibly querying data of the present invention comprises the following steps:
s1, establishing data source management, connecting a service database in a JDBC mode, and connecting a service system data source in the database to an address registration system, wherein the data mainly comprises management data of education industry, energy industry or retail industry, and the database generally comprises Mysql, Oracle or Sqlserver and the like;
the specific implementation method comprises the following steps: when connection needs to be established, a database connection address, a database name, a database account number and a password are set, a database type is selected, a program is spliced into a connection character string according to the database type and is connected to the database through JDBC driving.
S2, synchronizing the data table view structure of the service system to a temporary library in data source management, and performing grouping classification according to the tables, and setting service labels and table remarks;
the specific implementation method comprises the following steps: in order to flexibly configure multi-table view association and better express services, a data table view structure in a data source needs to be synchronized to a temporary library, tables are grouped and classified according to a service system, the tables are displayed according to a hierarchical structure, and service labels are written on the tables for remarking and facilitating query.
S3, establishing service groups, adding a service query model in the groups, selecting needed tables from the S2 group classification, setting the relationship among the tables, and finally forming the service query model;
the specific implementation method comprises the following steps: selecting a plurality of tables from a data source, wherein the first table is a main table, the other tables are auxiliary tables, selecting any field of the tables for association, the association relationship comprises inner connection, left outer connection, right outer connection and full outer connection, setting the table name at the same time, and finally saving the table name as a query model.
S4, displaying the set table according to the service classification for the user to use;
the specific implementation method comprises the following steps: when a service person selects a table or inquires through a service tag search table, the system reads the table with the relationship highlighted by automatic association of the configuration of the inquiry model, the service person selects a whole table or partial fields to input inquiry condition values as required, selects conditions of increment, and or to carry out inquiry, and automatically stores the inquiry as an inquiry template.
S5, switching the query mode into a chart for secondary processing analysis, bringing the query result into chart analysis, dragging the field to a longitudinal axis and a transverse axis, setting a calculation mode and a sorting mode on the longitudinal axis, and selecting a chart control for analysis;
the specific implementation method comprises the following steps: and splicing the selected table, longitudinal axis and transverse axis fields, calculation modes and sequencing modes into SQL sentences by using a pie chart, a broken line chart, a column chart, a scatter diagram, a rose diagram, a table or an area diagram of the open source chart plug-in ECharts, transmitting the SQL sentences to a database for query through JDBC connection, and converting the data query into a JSON format and transmitting the JSON format to an ECharts chart control for display.
S6, downloading the query result to the local in a static picture or Excel table form; and converting the query result into a file stream form, drawing the file stream form into a static picture, and transmitting the Excel form back to the local to realize downloading.
It will be appreciated by those of ordinary skill in the art that the embodiments described herein are intended to assist the reader in understanding the principles of the invention and are to be construed as being without limitation to such specifically recited embodiments and examples. Those skilled in the art can make various other specific changes and combinations based on the teachings of the present invention without departing from the spirit of the invention, and these changes and combinations are within the scope of the invention.
Claims (6)
1. A method for flexibly querying data, comprising the steps of:
s1, establishing data source management, connecting the database of the system through JDBC mode, and connecting the service system data source in the database to the address registration system;
s2, synchronizing the data table view structure of the service system to a temporary library in data source management, and performing grouping classification according to the tables, and setting service labels and table remarks;
s3, establishing service groups, adding a service query model in the groups, selecting needed tables from the S2 group classification, setting the relationship among the tables, and finally forming the service query model;
s4, displaying the set table according to the service classification for the user to use;
s5, switching the query mode into a chart for secondary processing analysis, bringing the query result into chart analysis, dragging the field to a longitudinal axis and a transverse axis, setting a calculation mode and a sorting mode on the longitudinal axis, and selecting a chart control for analysis;
and S6, downloading the query result to the local in a static picture or Excel table form.
2. The method for flexibly querying data according to claim 1, wherein the step S1 is specifically implemented by: when connection needs to be established, a database connection address, a database name, a database account number and a password are set, a database type is selected, a program is spliced into a connection character string according to the database type and is connected to the database through JDBC driving.
3. The method for flexibly querying data according to claim 1, wherein the step S2 is specifically implemented by: in order to flexibly configure multi-table view association and better express services, a data table view structure in a data source needs to be synchronized to a temporary library, tables are grouped and classified according to a service system, the tables are displayed according to a hierarchical structure, and service labels are written on the tables for remarking and facilitating query.
4. The method for flexibly querying data according to claim 1, wherein the step S3 is specifically implemented by: selecting a plurality of tables from a data source, wherein the first table is a main table, the other tables are auxiliary tables, selecting any field of the tables for association, the association relationship comprises inner connection, left outer connection, right outer connection and full outer connection, setting the table name at the same time, and finally saving the table name as a query model.
5. The method for flexibly querying data according to claim 1, wherein the step S4 is specifically implemented by: when a service person selects a table or inquires through a service tag search table, the system reads the table with the relationship highlighted by automatic association of the configuration of the inquiry model, the service person selects a whole table or partial fields to input inquiry condition values as required, selects conditions of increment, and or to carry out inquiry, and automatically stores the inquiry as an inquiry template.
6. The method for flexibly querying data according to claim 1, wherein the step S5 is specifically implemented by: and splicing the selected table, longitudinal axis and transverse axis fields, calculation modes and sequencing modes into SQL sentences by using a pie chart, a broken line chart, a column chart, a scatter diagram, a rose diagram, a table or an area diagram of the open source chart plug-in ECharts, transmitting the SQL sentences to a database for query through JDBC connection, and converting the data query into a JSON format and transmitting the JSON format to an ECharts chart control for display.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110472869.6A CN113127518A (en) | 2021-04-29 | 2021-04-29 | Method for flexibly inquiring data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110472869.6A CN113127518A (en) | 2021-04-29 | 2021-04-29 | Method for flexibly inquiring data |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113127518A true CN113127518A (en) | 2021-07-16 |
Family
ID=76780434
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110472869.6A Pending CN113127518A (en) | 2021-04-29 | 2021-04-29 | Method for flexibly inquiring data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113127518A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107066499A (en) * | 2016-12-30 | 2017-08-18 | 江苏瑞中数据股份有限公司 | The data query method of multi-source data management and visualization system is stored towards isomery |
CN108628608A (en) * | 2018-04-16 | 2018-10-09 | 朗新科技股份有限公司 | A kind of method and device of data visualization |
CN111143402A (en) * | 2019-12-27 | 2020-05-12 | 浪潮通用软件有限公司 | Extended model generation method, device and medium |
-
2021
- 2021-04-29 CN CN202110472869.6A patent/CN113127518A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107066499A (en) * | 2016-12-30 | 2017-08-18 | 江苏瑞中数据股份有限公司 | The data query method of multi-source data management and visualization system is stored towards isomery |
CN108628608A (en) * | 2018-04-16 | 2018-10-09 | 朗新科技股份有限公司 | A kind of method and device of data visualization |
CN111143402A (en) * | 2019-12-27 | 2020-05-12 | 浪潮通用软件有限公司 | Extended model generation method, device and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20210311932A1 (en) | Tag management system | |
CN112052242A (en) | Data query method and device, electronic equipment and storage medium | |
CN102012945B (en) | User-oriented database management system | |
CN101452450A (en) | Multiple source data conversion service method and apparatus thereof | |
CN109377186A (en) | A kind of process management device and method | |
EP4160544A1 (en) | Three-dimensional model application method and system for nuclear power engineering modular construction | |
CN113254457B (en) | Account checking method, account checking system and computer readable storage medium | |
CN104123422A (en) | Pre-manufacturing design method through database management system | |
CN115098567B (en) | Low-code platform data transmission method based on BI platform | |
CN105975489A (en) | Metadata-based online SQL code completion method | |
CN109033157B (en) | Complex data retrieval method and system based on user-defined search condition tree | |
CN113127518A (en) | Method for flexibly inquiring data | |
CN104573229A (en) | Interface module for automatically introducing three-dimensional design data into process system and working method | |
CN111104475B (en) | Data storage and intelligent construction method of knowledge graph and implementation system | |
CN101447065A (en) | Method for uniformly collecting engineering progress data | |
CN112507017A (en) | Data table conversion method and device | |
CN110895739A (en) | System for automatically generating evaluation report and work flow thereof | |
CN115756436A (en) | Device and method for constructing visual large screen through template configuration | |
CN115237989A (en) | Mine data acquisition system | |
US20150032721A1 (en) | System and method for report to report generation | |
CN108287908A (en) | A kind of data visualisation system based on Cartographic Technique | |
CN107169044A (en) | A kind of city talent resource integrated management method | |
CN113139012A (en) | Method for processing data by ETL tool engine based on JSON and ETL data processing system | |
CN112527870A (en) | Electronic report generation method and device, electronic equipment and storage medium | |
CN109446380A (en) | A method of two tables of data relationships are described based on XML |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210716 |
|
RJ01 | Rejection of invention patent application after publication |