| This thesis introduces a test data automatically generating project for database statistical function test. The purpose of this project is to test the database statistical function. Statistic information is the vital information in the database, which is the Cost based Optimizer rely on. Here this thesis briefly presents the basic principle of database optimizer, several types of statistic information and how this information impacts database optimizer.The statistical information of real data is complex and diverse. Testers need to prepare for a large number of test data. Firstly, this paper analyzes the various ways for test data preparation: from real data source, by SQL script, and using the existing tools. Then, this paper compares the advantages and disadvantages of them above. In order to ensure the coverage of testing, assurance the quality of testing data, reduce labor cost, a more targeted tool to automatically generate test data is needed.Based on the analysis of the existing methods, this thesis shows its own solution which based on B/S structure gives user more convenient experience by defining at one place while generating at everyware. Here this paper compares the advantages and disadvantages between B/S and C/S structures, and draws a conclusion that B/S structure is much reasonable. After that, it gives a list of technology used and features of this project. Then given a brief introduction of Ajax technology which take a good advantage in user experience in the project. This paper also gives an introduction of multithreading used for concurrency between different connections and the design models used. Then comes to the most important part of the paper . This thesis lists the implementation of workload definition part and that of data generating in detail which are the main parts the author engaged in. It shows the ideas of the solution and algorithm follow the sequence as follows: basic statistical characteristics, distribution statistical characteristics and physical statistical characteristics.Finally, this paper reviewed the results of the project, compared with other solutions and proposed a number of ideas for improvement. |