CN101706823B - Inquiry system and method of customized database - Google Patents

Inquiry system and method of customized database Download PDF

Info

Publication number
CN101706823B
CN101706823B CN2009102593388A CN200910259338A CN101706823B CN 101706823 B CN101706823 B CN 101706823B CN 2009102593388 A CN2009102593388 A CN 2009102593388A CN 200910259338 A CN200910259338 A CN 200910259338A CN 101706823 B CN101706823 B CN 101706823B
Authority
CN
China
Prior art keywords
layer module
business
inquiry
database
module
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.)
Expired - Fee Related
Application number
CN2009102593388A
Other languages
Chinese (zh)
Other versions
CN101706823A (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.)
Billion world (Beijing) Network Technology Co., Ltd.
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN2009102593388A priority Critical patent/CN101706823B/en
Publication of CN101706823A publication Critical patent/CN101706823A/en
Application granted granted Critical
Publication of CN101706823B publication Critical patent/CN101706823B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses inquiry system and method of a customized database. The system comprises a WEB layer module, a service layer module, a DAO layer module and a physical layer module, wherein the WEB layer module calls the corresponding operational project function in the service layer module according to an operational project request of a user; the service layer module breaks up the corresponding operational project function into a plurality of business operations according to a calling indication of the WEB layer module and respectively calls a DAO operation method corresponding to the business operations in the DAO layer module; the physical layer module preliminarily creates an inquiry intermediate table and a public Bean class, i.e. a public affair object class, and inquires in the database according to the operational project request of the user and the preliminarily created inquiry intermediate table, and the inquired operational project result is put into the preliminarily created public Bean class. The invention realizes the real stripping of a framework layer and a data business layer in the inquiry developing process of the database and reduces the problem of difficult resource development and program maintenance.

Description

Customized database inquiry system and querying method
Technical field
The present invention relates to database technical field, relate in particular to a kind of customized database inquiry system and querying method.
Background technology
At present, in database information inquiry system performance history, generally for a certain project demands, the developer needs the corresponding interface of stand-alone development, logical process, and with mutual SQL statement of database etc., when the user wants a certain business module is made amendment or improved, need carry out corresponding modification to whole procedure.
Summary of the invention
In view of above-mentioned analysis, the present invention aims to provide a kind of customized database inquiry system and querying method, in order to solve the database information inquiry system exploitation complicated problems that exists in the prior art.
Purpose of the present invention mainly is achieved through the following technical solutions:
The invention provides a kind of customized database inquiry system, comprising: WEB layer module, service layer's module, DAO layer are data access interface layer module, physical layer module, wherein,
Described WEB layer module is used for the corresponding business item-function according to user's the described service layer of business item request call module;
Described service layer module is used for according to the indication of calling of described WEB layer module the corresponding service item-function being decomposed into a plurality of business operations, and calls DAO method of operating corresponding with a plurality of business operations in the described DAO layer module respectively;
Described DAO layer module is used for pre-defined a plurality of public DAO method of operating;
Described physical layer module, being used to be pre-created inquiry middle table and public Bean class is the public affair object class, and inquire about in database according to user's business item request and the inquiry middle table that is pre-created, the result of the business item that inquires is put into the public Bean class that is pre-created.
Further, described physical layer module specifically is used for, the inquiry middle table that is pre-created is inquired about in business item request according to the user, find this business item by the inquiry middle table, the result of this business item of inquiry in the database then, and the result of this business item that will inquire in database puts into the public Bean class that described physical layer module is pre-created.
Wherein, described inquiry middle table comprises a plurality of business items, and each business item comprises at least: the SQL that uses in entry name, the project, and the SQL query condition of using in the project.
The present invention also provides a kind of customized database querying method, utilize a kind of customized database inquiry system, described inquiry system comprises: WEB layer module, service layer's module, DAO layer are data access interface layer module, physical layer module, and then described method comprises:
Steps A: described WEB layer module is according to the corresponding business item-function in user's the described service layer of the business item request call module;
Step B: described service layer module is decomposed into a plurality of business operations according to the indication of calling of described WEB layer with the corresponding service item-function, and calls public DAO method of operating corresponding with a plurality of business operations in the described DAO layer module respectively;
Step C: described physical layer module is inquired about in database according to service request from user and the inquiry middle table that is pre-created, and the result of the business item that inquires is put into the public Bean class that is pre-created.
Further, described step C specifically comprises:
Described physical layer module is inquired about the inquiry middle table that is pre-created according to user's business item request, find this business item by the inquiry middle table, the result of this business item of inquiry in the database then, and the result of this business item that will inquire in database puts into the public Bean class that described physical layer module is pre-created.
Wherein, described inquiry middle table comprises a plurality of business items, and each business item comprises at least: the SQL that uses in entry name, the project, and the SQL query condition of using in the project.
Beneficial effect of the present invention is as follows:
The present invention has realized really peeling off of data base querying performance history ccf layer and data business layer, the data service project is independent from program fully, put into the database middle table and manage control, thereby effective minimizing is exploited natural resources and the problem of program maintenance difficulty.
Other features and advantages of the present invention will be set forth in the following description, and becoming apparent from instructions of part perhaps understood by implementing the present invention.Purpose of the present invention and other advantages can realize and obtain by specifically noted structure in the instructions of being write, claims and accompanying drawing.
Description of drawings
Fig. 1 is the structural representation of the described database inquiry system of the embodiment of the invention;
Fig. 2 is the schematic flow sheet of the described data base query method of the embodiment of the invention.
Embodiment
Specifically describe the preferred embodiments of the present invention below in conjunction with accompanying drawing, wherein, accompanying drawing constitutes the application's part, and is used from explaination principle of the present invention with embodiments of the invention one.For clear and simplification purpose, when it may make theme of the present invention smudgy, with specifying in detail of known function and structure in the omission device described herein.
1 pair of described database inquiry system of the embodiment of the invention is elaborated at first in conjunction with the accompanying drawings.
As shown in Figure 1, Fig. 1 is the structural representation of the described system of the embodiment of the invention, specifically can comprise: physical layer module, DAO (Data Access Objec, data access interface) layer module, service layer's module, WEB layer module; Below will be illustrated respectively each functional module.
(1) WEB layer module, the interface of user's operation, mainly you are responsible for carrying out the demonstration of page control and page business datum, when the user need carry out a certain business operation, the corresponding service item-function of WEB layer module invokes service layer module.
(2) service layer's module, module towards function, mainly be responsible for writing the specific implementation function of business item, to operate certain business item such as the user, after WEB layer module will be given service layer's module to the request of business item, service layer's module becomes many business operations (adding another one data recording etc. again such as deleting a data recording earlier) with this business item Function Decomposition, calls public DAO method of operating corresponding with these business operations in the DAO layer module according to the indication of calling of WEB layer module then.
(3) DAO layer module, the main various persistence operations of being responsible for as required, the public DAO method of operating that definition is corresponding; So-called DAO method of operating is a Database Accessing Methods, just database is made amendment, is deleted or the realization details of interpolation etc., and for example how SQL statement is write during retouching operation, and it is medium how object to be put into database; Owing to be self-defining DAO method of operating,, and the SQL statement that the DAO method of operating gathers deleted or modification etc. because when follow-up practicality and secondary development, can increase or delete DAO method of operating wherein.
(4) physical layer module mainly be responsible for being pre-created inquiry middle table and public Bean (public affair) class, and the result of this business item that will inquire is put into public Bean class from database;
Be exactly specifically, physical layer module has been pre-created an inquiry middle table, and this intermediate data table is used for writing down all business items, and each business item comprises entry name, the SQL that uses in the project, and the SQL query condition of using in the project etc.When the user carries out a certain business operation, physical layer module is inquired about this inquiry middle table according to the business item of user's operation, find the SQL query condition of using in SQL statement that this business item needs and this project, the SQL query condition of using in this project is replaced the assembling back inquires about in database, and the professional result that will inquire in database puts into the public Bean class of design, uses front page layout to carry out the displaying of data;
Adopt Ibatis (based on the persistent layer framework of Java) technology in the embodiment of the invention, physical layer module need be write the intermediate data Table X ML file of Ibatis as the inquiry middle table, and the public Bean class of writing this inquiry middle table correspondence.
Below more in conjunction with the accompanying drawings 2 pairs of described data base query methods of the embodiment of the invention be elaborated.
The described data base query method of the embodiment of the invention utilizes above-mentioned database inquiry system, physical layer module has been pre-created an inquiry middle table and a public Bean class, this intermediate data table is used for writing down all business items, each business item comprises entry name, the SQL that uses in the project, and the SQL query condition of using in the project etc.; DAO layer module has a plurality of public DAO methods of operating of definition in advance.
As shown in Figure 2, Fig. 2 is the schematic flow sheet of the described querying method of the embodiment of the invention, specifically can comprise the steps:
Step 201:WEB layer module is according to the corresponding business item-function in user's the business item request call service layer module;
Step 202: service layer's module is decomposed into a plurality of business operations according to the indication of calling of WEB layer module with the corresponding service item-function, and calls public DAO method of operating corresponding with a plurality of business operations in the DAO layer module respectively; So-called DAO method of operating is a Database Accessing Methods, just database is made amendment, is deleted or the realization details of interpolation etc., and for example how SQL statement is write during retouching operation, and it is medium how object to be put into database;
Step 203: physical layer module is inquired about in database according to service request from user and the inquiry middle table that is pre-created, and the result that will inquire puts into the public Bean class that is pre-created; Be exactly specifically, physical layer module has been pre-created an inquiry middle table, and this intermediate data table is used for writing down all business items, and each business item comprises entry name, the SQL that uses in the project, and the SQL query condition of using in the project etc.When the user carries out a certain business operation, physical layer module is inquired about this inquiry middle table according to the business item of user's operation, find the SQL query condition of using in SQL statement that this business item needs and this project, the SQL query condition of using in this project is replaced the assembling back inquires about in database, and the professional result that will inquire in database puts into the public Bean class of design, uses front page layout to carry out the displaying of data.
In sum, the embodiment of the invention provides a kind of customized database inquiry system and querying method, purpose is to be to realize really peeling off of data base querying performance history ccf layer and data business layer, by an inquiry middle table and public Bean class, the data service project is independent from program fully, put into the database middle table and manage control, thereby effective minimizing is exploited natural resources and the problem of program maintenance difficulty; By backstage dynamic creation and the exploitation of safeguarding a certain business item in the inquiry system, and can dynamically carry out the increase and the modification of SQL query statement, assurance system and database interactive portion stability and security, operation SQL query statement is simple and convenient, this system's runnable interface is unified, and program is simple, and code redundancy is few, and it is simply quick to carry out secondary development on this basis, reaches to promote information query system exploitation and stable technique effect fast.
The above; only for the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, and anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claims.

Claims (4)

1. a customized database inquiry system is characterized in that, comprising: WEB layer module, service layer's module, DAO layer are data access interface layer module, physical layer module, wherein,
Described WEB layer module is used for the corresponding business item-function according to user's the described service layer of business item request call module;
Described service layer module is used for according to the indication of calling of described WEB layer module the corresponding service item-function being decomposed into a plurality of business operations, and calls DAO method of operating corresponding with a plurality of business operations in the described DAO layer module respectively;
Described DAO layer module is used for pre-defined a plurality of public DAO method of operating;
Described physical layer module, being used to be pre-created inquiry middle table and public Bean class is the public affair object class, and inquire about in database according to user's business item request and the inquiry middle table that is pre-created, the result of the business item that inquires is put into the public Bean class that is pre-created; Described inquiry middle table comprises a plurality of business items, and each business item comprises at least: the SQL that uses in entry name, the project, and the SQL query condition of using in the project.
2. system according to claim 1, it is characterized in that, described physical layer module specifically is used for, the inquiry middle table that is pre-created is inquired about in business item request according to the user, find this business item by the inquiry middle table, the result of this business item of inquiry in the database then, and the result of this business item that will inquire in database puts into the public Bean class that described physical layer module is pre-created.
3. a customized database querying method is characterized in that, utilizes a kind of customized database inquiry system, and described inquiry system comprises: WEB layer module, service layer's module, DAO layer module, physical layer module, and then described method comprises:
Steps A: described WEB layer module is according to the corresponding business item-function in user's the described service layer of the business item request call module;
Step B: described service layer module is decomposed into a plurality of business operations according to the indication of calling of described WEB layer module with the corresponding service item-function, and calls public DAO method of operating corresponding with a plurality of business operations in the described DAO layer module respectively;
Step C: described physical layer module is inquired about in database according to service request from user and the inquiry middle table that is pre-created, and the result of the business item that inquires is put into the public Bean class that is pre-created; Described inquiry middle table comprises a plurality of business items, and each business item comprises at least: the SQL that uses in entry name, the project, and the SQL query condition of using in the project.
4. method according to claim 3 is characterized in that, described step C specifically comprises:
Described physical layer module is inquired about the inquiry middle table that is pre-created according to user's business item request, find this business item by the inquiry middle table, the result of this business item of inquiry in the database then, and the result of this business item that will inquire in database puts into the public Bean class that described physical layer module is pre-created.
CN2009102593388A 2009-12-18 2009-12-18 Inquiry system and method of customized database Expired - Fee Related CN101706823B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009102593388A CN101706823B (en) 2009-12-18 2009-12-18 Inquiry system and method of customized database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009102593388A CN101706823B (en) 2009-12-18 2009-12-18 Inquiry system and method of customized database

Publications (2)

Publication Number Publication Date
CN101706823A CN101706823A (en) 2010-05-12
CN101706823B true CN101706823B (en) 2011-09-21

Family

ID=42377048

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009102593388A Expired - Fee Related CN101706823B (en) 2009-12-18 2009-12-18 Inquiry system and method of customized database

Country Status (1)

Country Link
CN (1) CN101706823B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104516957A (en) * 2014-12-18 2015-04-15 深圳市燃气集团股份有限公司 Data query management method and system
CN105607906B (en) * 2015-12-18 2019-03-22 苏州奖多多科技有限公司 A kind of service implementation method, device and electronic equipment
CN108304219B (en) * 2016-09-18 2021-03-30 广东电网有限责任公司佛山供电局 Secondary development platform and method
CN110297843B (en) * 2019-07-02 2023-04-28 浪潮通用软件有限公司 Data query method and system for B/S system and terminal
CN111581234B (en) * 2020-05-09 2023-04-28 中国银行股份有限公司 RAC multi-node database query method, device and system
CN113704225B (en) * 2021-08-20 2024-02-13 济南浪潮数据技术有限公司 Method, system, device and storage medium for constructing and using configuration center

Also Published As

Publication number Publication date
CN101706823A (en) 2010-05-12

Similar Documents

Publication Publication Date Title
CN101706823B (en) Inquiry system and method of customized database
CN100456237C (en) Method and device for accessing database
US8898285B2 (en) Service oriented architecture version and dependency control
CN101699393B (en) Network-facing intelligent software interface dynamic generation method
US8984396B2 (en) Identifying and representing changes between extensible markup language (XML) files using symbols with data element indication and direction indication
CN103853543B (en) A kind of method for being applied to rapid build list in enterprise information system development process
US20150143355A1 (en) Service oriented architecture version and dependency control
CN107357593A (en) Source code file construction method, device, electric terminal and readable storage medium storing program for executing
CN104123227A (en) Method for automatically generating testing cases
CN106873974A (en) Smart code generates automotive engine system and method
CN111488143A (en) Automatic code generation device and method based on Springboot2
CN103914290A (en) Operating command processing method and device
CN101291253A (en) Man-machine command interaction method for network management terminal based on graphical interface
CN101604286B (en) Method for generating keyword-driving table
CN115599382A (en) Automatic Sar architecture based code automatic generation tool and method
CN104834715A (en) Website generating method and system based on components and container
JP6700554B2 (en) Distributed processing management method, distributed processing management program, and distributed processing management device
CN100485687C (en) Method and device for set-up disconnection data programmed model and its application
CN103107919A (en) Method and system for network resource modeling
CN112596711A (en) Personalized authority management setting method and system based on Web system
CN113177088A (en) Multi-scale simulation big data management system for material irradiation damage
US8136087B2 (en) In-line processing of standardized text values
CN102193947B (en) Data access processing method and system
CN102314495A (en) Method for maintaining database object
Xiaoli et al. XML-based heterogeneous database integration system design and implementation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20160928

Address after: 100000 Beijing city in Chaoyang District Lize Park 106 Building 2 layer 206A

Patentee after: Billion world (Beijing) Network Technology Co., Ltd.

Address before: 518057 Nanshan District Guangdong high tech Industrial Park, South Road, science and technology, ZTE building, Ministry of Justice

Patentee before: ZTE Corporation

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20110921

Termination date: 20171218