Summary of the invention
The present invention is directed to the deficiencies in the prior art, proposed a kind of ease for use and versatility taken into account simultaneously, the functional module of dynamic design client according to the actual requirements, and need not to carry out the user oriented data base management system (DBMS) that new code is write in client.
Technical scheme of the present invention is as follows:
A kind of data base management system (DBMS) is characterized in that: it comprises background data base, management platform and client, and data management module, configuration information module, querying condition administration module, query statement editor module are set in the described management platform; Described management platform arranges query interface in described client, and described client selects querying condition to input described management platform by query interface; Described database management module is connected with described background data base, and one or more database application is arranged in the described background data base; Described configuration information module is the configuration data of the described database application of each described back-end data lab setting, described configuration information module is exported main query statement collection and Database Connection Parameters to described querying condition administration module output condition variables set to described query statement editor module; The conditional-variable that described conditional-variable is concentrated is corresponding one by one with described querying condition, and conditional-variable is arranged in the described main query statement; Querying condition is converted into the variable name that argument sequence is replaced described conditional-variable, makes described main query statement be converted into the described background data base of input behind the query statement, exports the database application Query Result corresponding with query statement.
Parameter in the described argument sequence group comprises data type, display label, default value, drop-down list parameters, control size and display position.
When being simultaneously displayed on a Query Result with the multiclass Query Result, concentrate by needs, described configuration information module is to described querying condition administration module input grouping variable, press the order of variate-value sequence set, successively the grouping variate-value in each variate-value sequence is updated in the main query statement of described query statement editor module, all grouping variable names are replaced to corresponding variate-value; Each component group variable name is carried out a subquery statement, carries out successively many group subquery statements and obtains query results.
Described database application is the stored items of data in described background data base, can preset a plurality of database applications in the background data base, and each database application can connect a plurality of different background data bases simultaneously.
Described configuration information module is to data result display module output Query Result display parameter, and described data result display module shows query results in conjunction with described Query Result and described Query Result display parameter in described client.
Described management platform comprises that also one is used for the data drawing list display module with Query Result generated data and/or chart demonstration, and described configuration information module is exported described Query Result display parameter to the data drawing list display module.
Described management platform is carried out information interaction by ADO interface and described background data base.
Described management platform is carried out information interaction by ADO interface and described background data base.
Described management platform is carried out information interaction by ADO interface and described background data base.
Described database application is presented in the described data base directory in the mode of directory tree.
Technique effect of the present invention is as follows:
A kind of data base management system (DBMS) of the present invention, it comprises background data base, management platform and client, and data management module, configuration information module, querying condition administration module, query statement editor module are set in the management platform; Query interface is set on the client, and management platform can be in arbitrary query interface login; Database management module is connected with background data base, and one or more database application is arranged in the background data base; The configuration information module is each back-end data lab setting configuration data, and the configuration information module is exported main query statement collection and Database Connection Parameters to querying condition administration module output condition variables set to the query statement editor module.Because the querying condition that shows on the conditional-variable that conditional-variable is concentrated and the query interface is corresponding one by one, querying condition is converted into the variable name that argument sequence is replaced main query statement conditional variable, input background data base behind the generated query statement, thereby querying condition by user selection after by conditional-variable and the dynamic combination of main query statement, can be in the dynamic management that realizes inquiry system, the query function of expansion original system.Main query statement, conditional-variable and querying condition in the native system all can be designed by the keeper, and the querying condition that normal client only need need in the query interface selection of client, and input relevant parameter, can realize by the mapping of querying condition to query statement, need not directly to use basic database language that background data base is operated.
System of the present invention is divided into two kinds of mode of operations of keeper and domestic consumer, the keeper is responsible in management platform database application, main query statement, conditional-variable and querying condition being designed, domestic consumer has solved the contradiction of software generic and ease for use only in the rights of using of client.The inquiry and analysis option of the query interface of client all adopts dynamic generation, and domestic consumer can expand the application of oneself very easily, and need not to write new program code, has very strong extensibility.
Native system conditional variable can be set to independently query statement, the list content that therefore can satisfy condition according to the as a result Dynamic Generation that other querying condition is selected, and can not show garbage.The grouping variable is optional, only have the user of working as the multiclass Query Result need to be simultaneously displayed in the middle of the query results, and the querying condition of these statisticss, computing method are all different, can't use in the situation that single query statement finishes, and just can use the grouping variable.The above-mentioned native system that is arranged so that has the characteristics of high degree of flexibility and extensibility.
Embodiment
The present invention will be described below in conjunction with accompanying drawing.
As shown in Figure 1, the user oriented data base management system (DBMS) of the present invention comprises background data base 1, management platform 2 and client 3, is provided with ADO (ActiveX Data Obiect) interface 21, data management module 22, database application catalogue 23, configuration information module 24, querying condition administration module 25, query statement editor module 26 and intelligent integrate module 27 in the management platform 2.Wherein domestic consumer uses client 3 to conduct interviews by 2 pairs of background data bases 1 of management platform, selects querying condition in the drop-down menu of user by client 3 display interfaces, realizes the operation of inquiry and analysis data; Management platform 2 is provided for the display interface of data management, inquiry and analysis to client 3, has avoided domestic consumer need to edit the querying command of based on database grammer; The keeper can be to using domestic consumer's setup and use authority of client 3 on management platform 2, and the setting in the management platform 2 can't be revised by domestic consumer.ADO interface 21 is OO Universal Database access interfaces of Microsoft development data storehouse application program, characteristics with highly versatile, can make management platform 2 be connected to Access, dBase in the background data base 1, Oracle, SQL Server, the current common Database Systems such as Visual Foxpro, MySQL, can realize that also management platform 2 manages a plurality of different background data bases 1 simultaneously.
Data management module 22 is undertaken alternately by ADO interface 21 and background data base 1, so that the keeper can be preset at the database application in foreground and background databases 1 in platform database 1.Wherein database application is the stored items of data in background data base 1, and such as tables of data such as spun yarn output statistics table, spun yarn statistic of attribute tables, the function of database application depends on keeper's setting fully.According to the content of database application, can preset a plurality of database applications in the background data base 1, each database application also can connect a plurality of different background data bases 1 simultaneously.Database application catalogue 23 is used for managing the database application of above-mentioned database management module 22, adopt the mode of directory tree to show rating information and the hierarchical relationship thereof that disparate databases is used, and client 3 is set the authority that the access disparate databases is used catalogue; The keeper of management platform 2 can freely increase, deletes and manage different database applications, such as data typing module, data query and the functional modules such as data analysis, chart.
Be provided with independent configuration data for each background data base 1 in the configuration information module 24, be used for the relevant configuration information that the storage current database is used, according to the difference that arranges, can realize multiple different database management function in client 3.Client 3 is before opening a database application catalogue or database application, to from the configuration information module 24 of management platform 2, read the relevant configuration data first, dynamically generate afterwards user's query interface of client 3 in client 3, needed querying condition can be selected by the drop-down menu of user's query interface by domestic consumer.Configuration data adopts similar standard I ni file structure, configuration data comprises Database Connection Parameters 241, grouping variables set 242, conditional-variable collection 243, main query statement collection 244 and Query Result display parameter 245, and Query Result display parameter 245 can be divided into tables of data display parameter and chart display parameter.
Stored the link information of the background data base 1 of the correspondence that current database uses in the Database Connection Parameters 241, system can arrange simultaneously a plurality of different background data bases 1 and connect, and each independent database application optionally uses these connections.
Store a plurality of different conditional-variables in the conditional-variable collection 243, comprised conditional-variable name sequence and corresponding argument sequence group thereof.Conditional-variable comprises variable name and argument sequence, and each conditional-variable can arrange separately argument sequence wherein, and these parameters include: data type comprises character type, numeric type, logical type, date type etc.; Display label comprises information; Default value comprises the acquiescence displayed value; The drop-down list parameters comprises that the tabulation set pair answers displayed value tabulation, whether read-only arrange etc.; The control size; Display position etc.The keeper can freely define the querying condition setting that shows in client 3 drop-down menus in conditional-variable collection 243, the querying condition that shows in conditional-variable and the client 3 user's query interfaces is corresponding one by one, and system dynamically generates dissimilar controls according to the data type of querying condition.If character type data, what then querying condition was corresponding is a drop down list control, conditional-variable can be set to independently query statement, the list content that therefore can satisfy condition according to the as a result Dynamic Generation that other querying condition is selected, and can not show garbage.
Stored a plurality of different grouping variablees in the grouping variables set 242, comprised grouping variable name sequence and corresponding two parts of variate-value sequence set thereof, the variate-value sequence is made of a component group variate-value.The order of variate-value sequence set is pressed by system when inquiry, successively the grouping variate-value in each variate-value sequence is updated in the main query statement, and all grouping variable names are replaced to corresponding variate-value.Each component group variable name is carried out a subquery statement, and system carries out successively many group subquery statements and obtains final Query Result set, at last Query Result is integrated demonstration.Variate-value corresponding to grouping variable name is made of character string, can comprise query grammar, so dirigibility is strong, can remedy the query demand that the single query statement can't be finished.
Conditional-variable is with designated symbols “ ﹠amp; " start (with “ ﹠amp; Bian Liangming ﹠amp; " expression); represented that domestic consumer is selected or the parameter value corresponding to querying condition of input; when domestic consumer when client 3 has been selected a querying condition; system replaces the conditional-variable in the query grammar with parameter value corresponding to querying condition, be converted into the query statement that background data base 1 can directly be carried out.When domestic consumer need to gather the multiclass Query Result, will use the grouping variable, usually be applied to the different situation of condition of each inquiry, directly can't obtain desirable Query Result with conventional query statement.The grouping variable is with designated symbols "@" beginning (with "@variable name@" expression), being used for repeatedly, circulation obtains different Query Results, be equivalent to obtain respectively different subquery statements according to the different subitems of grouping variable, each subquery statement is carried out once independently inquiry and is obtained the subquery result, utilize intelligent integrate module 27 to be connected in the same Query Result each subquery result again, generate domestic consumer and hold intelligible Query Result.In actual use, the grouping variable is optional, only have the user of working as the multiclass Query Result need to be simultaneously displayed in the middle of the query results, and the querying condition of these statisticss, computing method are all different, can't use in the situation that single query statement finishes, just can use the grouping variable.
Stored main query statement in the main query statement collection 244, be used for carrying out inquiry and obtaining Query Result from background data base 1; Main query statement is to be stored in the middle of the allocation list as one section character string, and the keeper edits in editing machine.Because adopt ADO interface 21 among the present invention, so query grammar depends on the type of background data base 1 fully, and extremely strong versatility is arranged.The present invention expands main query statement, allows the keeper to add the requirement that grouping variable and conditional-variable satisfy dynamic queries.Querying condition with user selection during system queries is converted into argument sequence, replaces the variable name of described conditional-variable, makes main query statement be converted into input background data base 1 behind the query statement, thereby is converted into the query grammar that final background data base 1 is supported.
Stored the parameters such as interface display, statistical items, Graphic Design of Query Result in the Query Result display parameter 245, be used for showing the data results that domestic consumer needs at user's query interface.All quote the concept of conditional-variable name in these parameters, therefore can realize dynamically the result that will show.
Querying condition administration module 25 arranges the argument sequence group of each querying condition respective conditions variable for the keeper, wherein the querying condition dynamic management of user selection realized in the following way: the variable name of system's reading conditions variable from conditional-variable collection 243, according to the parameter of each conditional-variable in the argument sequence group, but querying condition control and the layout information thereof of dynamic creation domestic consumer direct control; When different querying conditions is selected by domestic consumer in the drop-down menu of client 3, by the configuration information of the argument sequence group in the conditional-variable, generate the central dynamic data information of drop-down menu.
Each database application in the database application catalogue 23 has independent query statement editor module 26, and the core of query statement editor module 26 is based on the query grammar of background data base 1 correspondence, comprises that conditional-variable and grouping variable two classes strengthen variable.Query statement editor module 26 is selected domestic consumer in drop-down menu querying condition and query grammar combine, and make the corresponding conditional-variable of each querying condition, reach the purpose of dynamic queries.The keeper can input main query statement in main query statement collection 244, in order to editing conditional-variable and correlation parameter sequence set thereof, and query grammar depends on the type of database of corresponding background data base 1 thereby highly versatile.
The querying condition that intelligence integrate module 27 is selected domestic consumer in the query statement in the query statement editor module 26 and the querying condition administration module 25 is integrated, conditional-variable collection 243 in the query statement editor module 26 and grouping variable are replaced with concrete value, even the result of querying condition is as the value of conditional-variable collection 243, generate at last the main query statement collection 244 that background data base 1 can directly be carried out, and transfer in the background data base 1 and carry out query manipulation.
In order to make things convenient for domestic consumer to consult and the action queries result in client 3, on client 3, also be provided with data result display module 28 and analysis diagram display module 29.Wherein data result display module 28 shows for the form that the Query Result with conditional-variable collection 243 transforms by electrical form, and the subquery of a plurality of subquery statements that comprise in the variable that will divide into groups as a result editor become an electrical form, the mode of the form that electrical form shows and data combination is determined by the data display parameter in the Query Result display parameter 245 of the configuration data of background data base 1.Analysis diagram display module 29 is used for the data of electrical form are further analyzed, processed, and the generation chart, and concrete analysis project, subtype, displaying contents are determined by the chart display parameter in the Query Result display parameter 245 in the configuration data.
As shown in Figure 2, the operating process of data base management system (DBMS) of the present invention can be divided into towards the keeper with towards two kinds of domestic consumers, and wherein the operating process towards the keeper may further comprise the steps:
1) with keeper's identity login management platform 2;
2) select to connect when foreground and background databases 1, and the database application of background data base 1 is set in data management module 22;
3) database application in database application catalogue 23 inediting data management modules 22, the database application in increasing newly, revise, deltreeing;
4) the main query statement that input database is used in query statement editor module 26 can optionally add conditional-variable and grouping variable as required;
5) in configuration information module 24 each background data base 1 is arranged corresponding configuration data, configuration data comprises Database Connection Parameters 1, grouping variables set 242, conditional-variable collection 243, main query statement collection 244 and Query Result display parameter 245.
Operating process towards domestic consumer may further comprise the steps:
A) with domestic consumer's identity login client 3;
B) in the database application catalogue 23 that user's query interface shows, select needed database application;
C) in the drop-down menu of database application, select querying condition;
D) click " inquiry " button;
E) user's query interface shows electrical form or the chart that needs.
Should be pointed out that the above embodiment can make the invention of those skilled in the art's comprehend, but do not limit the present invention in any way creation.Therefore; although this instructions has been described in detail the invention with reference to drawings and Examples; but; those skilled in the art are to be understood that; still can make amendment or be equal to replacement the invention; in a word, all do not break away from technical scheme and the improvement thereof of the spirit and scope of the invention, and it all should be encompassed in the middle of the protection domain of the invention patent.