CN103714066B - Database analysis device based on template - Google Patents
Database analysis device based on template Download PDFInfo
- Publication number
- CN103714066B CN103714066B CN201210374651.8A CN201210374651A CN103714066B CN 103714066 B CN103714066 B CN 103714066B CN 201210374651 A CN201210374651 A CN 201210374651A CN 103714066 B CN103714066 B CN 103714066B
- Authority
- CN
- China
- Prior art keywords
- sentence
- mode
- database
- data
- file
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3457—Performance evaluation by simulation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Debugging And Monitoring (AREA)
Abstract
Automated data library analyzer adapts to multitype database language, such as SQL and its branch using template.Template database schema and is combined the metadata of the operation of the database schema with defining.SQL file instantiates the database schema in just tested Database Systems.Then the operation to the database schema can be executed, to evaluate the performance of just tested Database Systems.
Description
Technical field
This disclosure relates to database analysis device, it particularly relates to the database analysis device based on template.
Background technique
Unless otherwise indicated herein, otherwise do not recognize that the disclosure of this part becomes existing skill due to being included in this section
Art.
Database product is becoming the increasingly common element of commercial enterprise.Memory database technology, such as SAPDatabase product is just becoming more universal.For realizing for back-end data base system in enterprise, database is set
Meter person possesses extensive technology and design alternative.However, each database product has the strong point and the weakness of itself of itself.Cause
This database designers allows for selecting most suitable database product for their specific application.
Generally, database designers take a lot of time to study and authentication data library candidate.In the presence of for evaluating number
According to the assessment tool of the performance metric in library, but the function restriction of limited range provided by these assessment tools performance metric
Validity.For example, general assessment tool focuses on one or several specific regions, so database designers are merely capable of
Evaluate the sub-fraction of entire database product.Assessment tool is typically dedicated to given database product, so with same
Tool is difficult to realize to the test of different database products.Typically assessment tool includes:
This assessment tool of DTM DB Stress- is provided solely for pressure (stress) test.
Agile Database Tools(Agile data base tool)-this tool only supports to around so-called
The test of the Database Systems of Agile data method design.
Online Database Functions Testing Tool(online database functional test tool)-this
Tool only supports Oracle functional unit to test.
This tool of Hibernate- only supports creation, reads to update and delete (CRUD) logic, has and is directed to structure
Change the low coverage rate of query language (SQL) sentence (statement).
Database product generally have the function of the intrinsic performance reference of their own (performance benchmark),
Specification (functionality specs), simple test tool etc..However, these tools do not adapt to hardware environment and answer
With the various combination of demand.Further, since the limited and privately owned Application Programming Interface (API) of database product, and cause
Do not support secondary development.
Summary of the invention
According to one aspect of the disclosure, a kind of method for database of ratings (DB) system is provided, it includes: operation
Computer system executes following steps: receiving template file, the template file describes the one of the DB language of the DB system
The grammer and syntax of a or multiple DB sentences;Meta data file is received, the meta data file includes the metadata of DB mode, institute
State DB mode metadata include the DB mode one or more DB tables metadata and the DB table data word
The metadata of section;DB sentence is generated according to the grammer and syntax specified in the template file, which includes for creating
First DB sentence of the example of the DB mode and the 2nd DB sentence that operation is executed for the DB table to the DB mode;It is logical
The first DB sentence of execution is crossed to instantiate the DB mode in the DB system;The 2nd DB sentence is executed to the DB mode
DB table execute operation;And the report DB system executes the performance of the 2nd DB sentence.
According to one aspect of the disclosure, a kind of Database Systems are provided, it includes: computer system;And data are deposited
Storage system, the program code for having the computer being stored thereon executable, the executable program code of the computer are worked as
When being executed by a computer system, so that computer system executes following operation: receiving template file, the template file describes institute
State the grammer and syntax of one or more DB sentences of the DB language of DB system;Receive meta data file, the meta data file
Metadata comprising DB mode, the metadata of the DB mode include the metadata of one or more DB tables of the DB mode
With the metadata of the data field of the DB table;DB sentence is generated according to the grammer and syntax specified in the template file,
The DB sentence includes that the DB table for creating the first DB sentence of the example of the DB mode and for the DB mode is held
2nd DB sentence of row operation;The DB mode is instantiated in the DB system by executing the first DB sentence;Execute the
Two DB sentences execute operation with the DB table to the DB mode;And the report DB system executes the property of the 2nd DB sentence
Energy.
According to one aspect of the disclosure, a kind of non-transient computer readable storage medium is provided, has and is stored in it
On the executable program code of computer, the executable program code of the computer makes when being executed by a computer system
Computer system executes following steps: receiving template file, the template file describes one of the DB language of the DB system
Or the grammer and syntax of multiple DB sentences;Meta data file is received, the meta data file includes the metadata of DB mode, described
The metadata of DB mode includes the metadata of one or more DB tables of the DB mode and the data field of the DB table
Metadata;DB sentence is generated according to the grammer and syntax specified in the template file, which includes for creating
It states the first DB sentence of the example of DB mode and executes the 2nd DB sentence of operation for the DB table to the DB mode;Pass through
It executes the first DB sentence and instantiates the DB mode in the DB system;The 2nd DB sentence is executed to the DB mode
DB table executes operation;And the report DB system executes the performance of the 2nd DB sentence.
Detailed description of the invention
Fig. 1 shows the example of the configuration of the database analysis device according to the disclosure.
Fig. 2 indicates the workflow in the embodiment of database analysis device.
Fig. 3 indicates the example of the template of the principle according to the disclosure.
Fig. 4 and Fig. 4 A indicates the example of the meta data file of the principle according to the disclosure.
Fig. 5 shows advanced (high level) block diagram of the specific embodiment according to the disclosure.
Specific embodiment
The disclosed embodiments are related to for generating and running the test feelings for evaluating the performance in Database Systems
The method and system of scape (test scenario).In the following description, for illustrative purposes, elaborate many examples and
Specific detail, in order to provide the thorough understanding to the disclosure.It will be apparent, however, to one skilled in the art that
The disclosure can individually comprise some or all of these examples feature as defined by the appended claims, or retouch with following
The other feature stated includes some or all of these examples feature in combination, and can also include feature described herein
Modification and equivalent with design.
Fig. 1 shows the configuration of database analysis device 100 according to an embodiment of the present disclosure.Database analysis device 100 is shown
Out to fit together with data base management system (DBMS) 10, the performance of data base management system (DBMS) 10 will be by the number
It is evaluated according to library analyzer.Database analysis device 100 can be via database API12 and database performance API14 and DBMS10
Interface.Database API12 allows to communicate with DBMS10 using (for example, database analysis device 100) to execute database manipulation, than
Such as, database table is created and deleted, increases, the data in modification and deletion database table, inquires database table, or
DBMS is accessed in other ways.Database performance API14 allows to apply, such as database analysis device 100, and access DBMS10 exists
The performance data generated during the operation of DBMS.Performance data may include such data, for example, memory utilization rate, CPU
Utilization rate, page exchange (swapping) etc..Particular kind of data can be different between a DBMS and another DBMS.
In certain embodiments, database analysis device 100 may include system control position 102, structured query language
(SQL) generator 104, analysis performer (analysis runner) 106, tracking manager (trce manager) 108 and report
Announcement center 110.System control position 102 may be used as the management interface of function performed by database analysis device 100.In certain realities
It applies in example, command line interface (CLI) access system control position 102 can be used in user (for example, data base administration user).When
So, it is understood that in other embodiments, other Interface designs can be used.
User can access database analyser function via system control position 102.System control position 102 can be in response to
The operation of other modules of the input control of user including database analysis device 100.System control position 102 can coordinate mould
Movement between block.User can obtain the current place for the test run (test run) that database analysis device 100 is carrying out
Manage procedural information, about ongoing or previous test run performance information, etc..User can star test scene
" single run (single run) " or test scene " circular flow (loop run) ".
As will be discussed below, test run refers to operation test scene, and tests scene and refer to DBMS10's
The operation of volume of data library.Test scene can specify the database schema (database that will be created in DBMS10
Schema) and be arranged be applied to the database schema with simulate the user of the database schema true environment (for example, number
Hundred Dao thousands of) database statement.Therefore operation test scene be used to test the ability of DBMS10, the performance of DBMS, etc..
" single operation " refer to execute test scene it is primary and performance is generated according to the performance data collected during the operation as a result,
And " circular flow " refers to that the execution test scene is multiple, performance data of the aggregation from the operation executed every time, and according to
The performance data (for example, by being averaging to the data) assembled is come generative nature energy result.In a typical use-case, user
The single operation of scene can be tested with original execution to verify the database manipulation of the test scene and identify that any logic is wrong
Accidentally, so that user be allowed to carry out troubleshooting and improvement to the test scene as needed.It, can after demonstrating test scene
To carry out assessment of performance by the one or more circular flows for executing the test scene.It is explained below to test the another of scene
Outer details.
It continues to refer to figure 1, generator 104 can be used for generating the SQL file for constituting test scene.Although disclosed reality
It applies and exemplifies the database language for using SQL as DBMS10, it should be noted that can also support other than SQL
Database language.SQL file includes for the SQL statement according to test scene training (exercise) DBMS10.Test scene
It can be embodied in the SQL statement comprising SQL file.Test scene may include executing selection (SELECT) operation, merging
(JOIN) it operates, various cluster (aggregation) operations, etc..Test scene may include any combination of SQL statement with
And any number of SQL statement.
In certain embodiments, SQL generator 104 may include template provider 122, metadata provider 124 and life
Grow up to be a useful person 126.The data repository (not shown) of the accessible template file of template provider 122 is with by selected template file
112 are supplied to generator 126.Equally, the data repository (not shown) of the accessible meta data file of metadata provider 124
Selected meta data file 114 is supplied to generator 126.Then selected template text can be used in generator 126
The information that includes in part 112 and selected meta data file 114 generates file 116.Mould will be discussed in greater detail below
Plate file and meta data file.
Analysis performer 106 can scan SQL file 116, to be realized to DBMS10 operation with SQL statement in SQL file
Test scene.Therefore, in certain embodiments, analysis performer 106 can via database API12 and DBMS10 interface,
It is responded to send SQL statement to DBMS10 and receive from DBMS.
In certain embodiments, analysis performer 106 may include several test modules for running test scene
132.Each test module 132 can test DBMS10 in specific method to evaluate the particular aspects of DBMS.For example, function is steady
Qualitative module can evaluate DBMS10 certain functions (for example, the cluster of large database concept table, etc.) can be handled to have it is more
It is good.Performance module can evaluate when process database operations (for example, selection operation, union operation, etc.) when DBMS10 in
The runing time of operation.Memory utilization rate module can evaluate the memory management ability of DBMS10;For example, peak can be monitored
It is worth memory utilization rate, etc..Therefore, analysis performer 106 can collect performance number with database performance API14 interface
According to and other environmental information, performance data and other environmental information are referred to as " performance data " herein, should " performance data " by
DBMS10 is generated and is provided.
In certain embodiments, tracing management 108 can receive performance data collected by analysis performer 106.Tracking
Manager 108 can store the performance data of each run, either from the data of single operation, or come from circular flow
The data being run multiple times.Tracking manager 108 also can store to be had with management system log and with the operation of test scene
The other information of pass.
Reporting Center 110 can receive the data as data flow from tracking manager 108 and prepare about DBMS10
Performance report.In certain embodiments, Reporting Center 110 may include three configurable components.Data collector 142
User can be selected and be intended for its data for generating report.In certain embodiments, data collector 142 can be in standard
The file scan and data filtering realized in Java file manipulation (standard Java file manipulating) API are answered
With.User can define the filter that data collector 142 is used to extract the data in the data flow from tracking manager 108
Type.Only as an example, it is assumed that user wants to report two days from test scene operation data.It can be used
" date filter " is filtered to this two days matched data of concern.Other data filter can be used
To particular kind of data (for example, memory utilization rate data, processor utilization rate data, etc.) be filtered.
Reporting Center 110 may include analyzer 144, and analyzer 144 executes the received data of data collector 142 each
Kind calculates.Calculating may include be averaging and ask variance, statistical analysis, trend analysis, prediction modeling, etc..144 institute of analyzer
The analysis data of generation can be provided to Report Builder 146 to report the analysis data.The analysis data can be with any
Suitable format is presented.For example, Flex Reporting Tools can be used to draw report to be delivered to network (web) user.Report can
To useThe formats such as file.The analysis data may include chart, for example, bar chart, pie chart, line chart, etc..
Fig. 2 shows the typical works according to the database analysis devices 100 of some embodiments.Therefore, 202, database
Analyzer 100 can receive template file (for example, template provider 122 provides template file 112 to generator 126).It is as follows
What face will be explained in greater detail, template file specifies the grammer of database language (for example, SQL) used in DBMS10
(grammar) and syntax (syntax).User can be via system control position 102 from the repository of template file predetermined
Template file is specified in the middle.In certain embodiments, user can modify template file predetermined, then template provider
The modified template file predetermined can be supplied to template file of the generator 126 as customization.In certain realities
Apply in example, user can " (from scratch) since most " define themselves customization template file.The mould of customization
Plate file can be added to the repository of template file predetermined, use for future.
204, database analysis device 100 can receive meta data file (for example, metadata provider 124 is to generator
126 provide meta data file 114).As will be explained in more detail, meta data file definition test scene and specified number
According to library mode and the database manipulation that will be executed to database schema.User can be fixed from advance via system control position 102
Specified meta data file in the set of the meta data file of justice.In certain embodiments, user can modify predetermined
Meta data file, then the modified meta data file predetermined can be supplied to generation by metadata provider 124
Meta data file of the device 126 as customization.In certain embodiments, user can " (from scratch) since most " definition
The meta data file of themselves customization.The meta data file of customization can be added to meta data file predetermined
Repository is used for future.
206, database analysis device 100 can obtain the data value that will be loaded into database table, the data value
It include the database schema specified in 204 received meta data files.In certain embodiments, which can be from user
Actual database system (not shown) obtain.It is merely exemplary, it is assumed that DBMS10 is that user is being considered as him
Existing database system alternative candidate data library system.Therefore, the number that will be loaded into database schema
It can be obtained from the existing database system (not shown) of user according to value.For example, database analysis device 100 can be used it is suitable
The API of conjunction and the existing database system interface of user.206, user be can specify from their existing database system
Which table obtain data value.
In other embodiments, the data value at 206 can be by one or more random value generators in generator 126
It is randomly generated.For example, generator 126 may include for generating the random generator of random text, for generating random number
Another random generator, etc..In the case where data sensitive, for example, the outflow that may relate to private information the case where
Under it is preferable to use the data values generated at random.For example, employee's wage, medical information, etc., be that should maintain secrecy very
The information of privately owned sensitivity.Therefore, sensitive or secret the data value of being considered as that test scene uses can be with generating at random
Value is replaced.In certain embodiments, the data value obtained 206 may include the data value of Database Systems from the user
The data value generated at random.
208, the test feelings of the SQL statement set comprising being stored in SQL file are can be generated in database analysis device 100
Scape.For example, user can input order from system control position 102 to start using specified template file, specified meta data file
And the source of (existing Database Systems from the user, generating at random, or both certain combination) data value generates
Test scene.
Test scene can specify the database schema created on the DBMS10 being just assessed and for access and
The database statement that database schema is operated in other ways.Therefore, in certain embodiments, database analysis device
100(is for example, via generator 126) set for creating the SQL statement of database schema can be generated in 208a, for example,
A series of SQL create (CREATE) sentence.SQL statement may include for the insertion to database schema load data value
(INSERT) sentence.These SQL statements may be constructed part preparation (PREPARE) in SQL file.In 208b, database point
The set for the SQL statement that access or other means operates database schema can be generated in parser 100.These sentences are constituted
The database manipulation of training DBMS10, and basis based on the performance of evaluation DBMS can be formed.These sentences can be deposited
Storage is in part execution (EXECUTE) of SQL file.(clean-up) is removed in some embodiments it is possible to generate in 208c
SQL statement, for deleting database schema after the test to DBMS10 has terminated.These SQL statements may be constructed SQL
Part removing (CLEAN) of file.
According to the principle of the disclosure, generator 126 can be used grammer in 202 received template files and syntax with
And the specification in 204 received meta data files, to generate the grammer and the correct SQL language of syntax that can be executed by DBMS10
Database schema, is instantiated in the DBMS and is loaded data into the database mould of instantiation by sentence (preliminary fractions)
Formula.Similarly, generator 126 generates the correct SQL statement (execution part) that can be executed by DBMS10, to use formation
Database schema in the basis for evaluating the DBMS is accessed and is operated.
When user wants operation test scene, user can be issued in system control position 102 for running test scene
Order.User can identify interested test scene, and feelings are tested in specified single operation test scene or circular flow
Scape n times.User can specify using which test module 132 and test DBMS10.For example, in certain embodiments, each survey
Die trial block may have the respective profiles comprising test instruction, test instruction control analysis performer 106 into
Capable data collection.Merely exemplary, functional stabilization module can have such instruction, i.e., " while statement executes the time
Greater than 5 seconds Shi Jilu (record when statement-execution-time > 5seconds) ", for identification have compared with
The sentence of slow execution time.User can configure configuration file to the type of the specified information that will be recorded during operation.
Then database analysis device 100 accessible corresponding SQL file and executes in accessed SQL file not
Same part.Therefore, 222, database analysis device 100(is for example, via analysis performer 106) it can scan and accessed
SQL statement in preliminary fractions of the SQL file to identify accessed SQL file.Then SQL statement can be executed to cause to count
According to instantiation of the library mode on DBMS10.For example, analysis performer 106 includes to DBMS10 transmission via database API12
The SQL statement of the preliminary fractions of the SQL file accessed.The SQL statement can create database schema and can be by data
Value is inserted into the database schema.
224, database analysis device 100 can execute the execution part of accessed SQL file to carry out to DBMS10
Test.For example, database analysis device 100(is for example, via analysis performer 106) accessed SQL file can be scanned to know
SQL statement in the execution part of other accessed SQL file.In the case where single operation, analysis performer 106 can be swept
The execution part for retouching accessed SQL file is primary, and each SQL statement is sent to DBMS10.The circular flow the case where
In, the execution part for the SQL file that the number of scans that analysis performer 106 can have been specified according to user is accessed.
As DBMS10 executes database manipulation, DBMS can be generated and collect and its performance, resource utilization etc.
Relevant data.Such information can be used via database performance API14 in the external of DBMS10.Therefore, with
DBMS10 can collect performance data from DBMS 226 in 224 operations, analysis performer 106.Analyzing performer 106 can be
228 provide the performance data, to be recorded by tracking manager 108 and to be managed in other ways.
In operation test scene finally, user can issue via system control position 102 for generating report 232
Order.User can delete database schema 242.In certain embodiments, the deletion of database schema may need to come from
The implicit commands of user.Since creation database schema may take a long time, it is possible that it is not expected that being transported in test
Database schema is automatically deleted after row.
Template file
Common database language is SQL.However, in these years developing out many SQL language branch (dialect) and difference
Database seller may use different SQL language branch.Therefore, according to the principle of the disclosure, template file specifies DBMS10 institute
The specific SQL language branch used.It is appreciated of course that the template file can indicate the database language other than SQL.
In some embodiments it is possible to provide the repository of template file for different SQL language branch.For example, can beSQL language Zhi Dingyi one or more template file used in Database Systems can be MySQL database system etc.
Equal definition templates file.Therefore, depending on the specific DBMS10 evaluated, user, which can choose, to be specified for the DBMS's
The template file predetermined of SQL syntax and syntax.Certain DBMS can support multilingual, in such a case, it is possible to
There are multiple template file, each template file is directed to a kind of language.In some embodiments it is possible to provide template building work
Tool, to allow user to modify template file predetermined in the case where existing template file does not support specific DBMS, thus
Modify SQL syntax or syntax.
Fig. 3 shows the example of the content of template file 112.Template file can indicate to indicate using suitable representation
SQL statement is with the grammer and syntax of specified SQL.Example in Fig. 3 shows the segment of template file, shows SQL insertion sentence
Representation.The representation may include placeholder 302, and placeholder 302 quotes certain database table title, field
(field) title, etc..Template file can be used to generate by generator 126 grammer that DBMS10 can recognize and syntax just
True SQL statement.Other SQL statements can indicate with similar method, to specify their grammer and syntax.
Meta data file
As explained above, template file 112 inform generator 126 how generative grammar and the correct SQL language of syntax
Sentence.According to the disclosure, meta data file 114 informs what SQL statement generator 126 generates.Meta data file will comprising specifying
Will to DBMS10 execute operation without specify how (" how " be template file work) express the operation information (" member
Data statement ").Therefore, meta data file may include first number of the specified database schema that will be instantiated on DBMS10
According to sentence.For example, the metadata sentence can specify the title of database schema.Metadata sentence can specify comprising database
The database table of mode, the database schema include title, the data word of each database table of each database table
Section (data field), each data field data type, etc..Meta data file also may include for it is specified will be right
The metadata sentence of operation or the access that the database schema of instantiation will be carried out that the database schema of instantiation executes.
The SQL statement that database schema is instantiated in DBMS10 constitutes the preliminary fractions of SQL file 116 and to the number of instantiation
The execution part of the SQL file is constituted according to the SQL statement that library mode operate or access in other ways.
Fig. 4 shows the example for the metadata sentence that may be embodied in meta data file 114.Metadata sentence can specify
The instance name 402 of various elements in the example of identification database mode, for example, database schema title, include database
The title of the database table of mode, the title of data field comprising database table, etc..Instance name 402 is in template
There is corresponding placeholder 302 in file.For example, the metadata sentence of specified insertion operation can specify in template file
The corresponding instance name of placeholder being inserted into the representation of SQL statement.Generator 126 can be used in template file
The representation of SQL statement is inserted into, by substituting placeholder with instance name, to generate the SQL statement.
Example shown in Fig. 4 indicates the segment of meta data file, shows the database table for being called people (PERSON)
Metadata sentence.As can be seen that the metadata sentence also specifies composition data field (constituent data field)
Attribute, for example, data type, size of data, etc..The metadata sentence can be represented as Java set (Java
Collection).Fig. 4 A shows the wherein metadata sentence and is represented as JavaScript object expression (JavaScript
Object Notation, JSON) file another embodiment.
In certain embodiments, user can create wants to instantiate on DBMS10 being evaluated for defining them
Database schema meta data file.User can be specified in the meta data file for database mode access and
The SQL statement of operation.In other embodiments, database analysis device 100 may include one or more first numbers predetermined
According to file.Such meta data file predetermined can be used to define universal test scene (generic test
Scenario), the test scene for developing themselves in order to avoid user has to.For example, meta data file predetermined can be with
" pet shop (pet store) " scene is used when applying using well-known test J2EE, as being used as standard
The universal test scene of test.
Fig. 5, which is shown, can be configured and program using as the calculating operated according to the database analysis device 100 of the disclosure
The high level block diagram of machine system 502.Computer system 502 may include the similar data of central processing unit (CPU) 512 or other
Processing component.CPU512 can be uniprocessor or multiprocessor subsystem.Computer system 502 may include various storage groups
Part.For example, storage assembly may include volatile memory 514(for example, random access memory, RAM) and data storage set
Standby 516.Communication interface 518 can be provided with allow computer system 502 by communication network 522(for example, Local Area Network,
Internet etc.) Lai Tongxin.Internal bus 520 can will be interconnected comprising the component of computer system 502.
Data storage device 516 may include non-transient computer-readable medium, and being stored with computer on the medium can
The program code 532 of execution.The executable program code 532 of computer operates such that CPU executes the disclosure by CPU512
Step, such as step described in Fig. 2.Data storage device 516 can store data structure 534, for example, object instance number
According to object and any other data described herein when, operation.For example, in certain embodiments, data structure 534 can be with
Including template file 112, meta data file 114 and SQL file 116.
User's (for example, database administrator) can be used suitable user interface facilities 542 and computer system 502 and hand over
Mutually.User interface facilities 542 may include such as input equipment and output equipment, input equipment for example keyboard, keypad, mouse or
Other pointing devices, output equipment such as display.In certain embodiments, user interface facilities 542 may include display and set
Standby and keyboard, for accessing system control position 102 via command line interface.
It is computer-readable that all systems and process discussed herein can be embodied in one or more non-transients
In the program code stored on medium.Such medium may include such as floppy disk, CD-ROM, DVD-ROM, flash drives, magnetic
Band and solid-state random-access memory (ram) or read-only memory (ROM) storage unit.It is appreciated that embodiment is not limited to firmly
Any specific combination of part and software.Having herein been described as the element being in communication with each other can be directly or indirectly through any number
Purpose is used for transmission the not homologous ray of data to communicate, and the not homologous ray for being used for transmission data includes but is not limited to shared deposits
Store up communication, local area network, wide area network, telephone network, cellular network, light network, satellite network, infrared network, radio frequency network with
And it can be used to transmit the network of any other type of information between devices.In addition, the communication between system can pass through
Any one or more known transport protocols carry out, the transport protocol such as ATM(Asynchronous Transfer Mode), internet protocol
Discuss (IP), HTTP(Hypertext Transport Protocol) and wireless application protocol (wap).
Advantage and technical effect
The database analysis device of the disclosure provides a variety of analysis modules, for example, stability, performance, memory utilization rate, etc.
Deng.The use of template and metadata reduces user's labour required when establishing the emulation to existing database behavior.Template
Can support currently a popular database, for example, SQL, MySQL, Oracle, MaxDB, etc..User can be with editing template (example
Such as, using template the build tool) carry out custom built forms, thus cover large-scale SQL language branch (SQL dialects).User can be with
Editing meta-data realizes any and complicated logic.This allows user to design test scene to identify in just tested DBMS
Potential processing and storage bottleneck.
For system designer or application developer, database analysis device 100 can be used to carry out analysis of cases
Professional tool.Them can be helped about should use that with the report of the detailed analysis of stability test by comparing including performance
Back-end data base solution makes correct decision.
The example how aspect of various embodiments and the disclosure that above description shows the disclosure can be realized.More than
Example and embodiment are not construed as only embodiment, and are presented with and illustrate as defined in appended claims originally
Disclosed flexibility and advantage.Based on disclosed above and appended claims, other arrangements, embodiment, embodiment and equivalent
Object is it will become apparent to those skilled in the art that and can be used without departing from such as appended claims institute
The spirit and scope of the present disclosure of definition.
Claims (20)
1. a kind of method for database of ratings DB system, includes: operation computer system executes following steps:
Template file is received, which describes the grammer and sentence of one or more DB sentences of the DB language of the DB system
Method;
Meta data file is received, which defines test scene and include the metadata of DB mode, the DB mode
Metadata include DB mode one or more DB tables metadata and DB table data field metadata;
DB is generated according to specification defined in the grammer and syntax and the meta data file specified in the template file
Sentence, the first DB sentence comprising the example for creating the DB mode and the DB table for the DB mode execute behaviour
The 2nd DB sentence made;
The DB mode is instantiated in the DB system by executing the first DB sentence;
It executes the 2nd DB sentence and operation is executed with the DB table to the DB mode;And
Report that the DB system executes the performance of the 2nd DB sentence.
2. the method for claim 1, wherein data value is inserted into the DB table by the first DB sentence.
3. the method as described in claim 1 also includes: it obtains the data value in the DB table for being inserted into the DB mode,
Wherein, the first DB sentence includes the DB sentence being inserted into the data value in the DB table.
4. method as claimed in claim 3 also includes: receiving the data value from existing database system.
5. method as claimed in claim 3, wherein what at least some of described data value was randomly generated.
6. the method as described in claim 1, further includes: collect performance number from the DB system during executing the 2nd DB sentence
According to.
7. the method as described in claim 1, further includes: it is one or many to repeat the 2nd DB sentence, and repeatedly report
The DB system executes the performance of the 2nd DB sentence.
8. the method for claim 1, wherein the template file is one in multiple template files predetermined
A, each template file predetermined specifies the grammer and syntax for different DB language.
9. the method for claim 1, wherein the meta data file is in multiple meta data files predetermined
One.
10. the method for claim 1, wherein the DB sentence includes the 3rd DB sentence, the 3rd DB sentence is from the DB
DB mode described in system-kill, this method further include: by executing the 3rd DB sentence after executing the 2nd DB sentence, from described
DB mode described in DB system-kill.
11. the method for claim 1, wherein the DB language is structured query language (SQL).
12. a kind of database D B system, includes:
Computer system;And
Data-storage system, the program code for having the computer being stored thereon executable, what the computer can be performed
Program code is when being executed by a computer system, so that computer system executes following operation:
Template file is received, which describes the grammer and sentence of one or more DB sentences of the DB language of the DB system
Method;
Meta data file is received, which defines test scene and include the metadata of DB mode, the DB mode
Metadata include the DB mode one or more DB tables metadata and the DB table data field first number
According to;
DB is generated according to specification defined in the grammer and syntax and the meta data file specified in the template file
Sentence, the DB sentence include the first DB sentence of the example for creating the DB mode and execute behaviour to the DB table of the DB mode
The 2nd DB sentence made;
The DB mode is instantiated in the DB system by executing the first DB sentence;
It executes the 2nd DB sentence and operation is executed with the DB table to the DB mode;And
Report that the DB system executes the performance of the 2nd DB sentence.
13. system as claimed in claim 12, wherein data value is inserted into the DB table by the first DB sentence.
14. system as claimed in claim 12, wherein the computer-executable code obtains the computer system
It obtains the data value in the DB table for being inserted into the DB mode, wherein the first DB sentence includes for inserting the data value
Enter the DB sentence in the DB table.
15. system as claimed in claim 14, wherein what at least some of described data value was randomly generated.
16. system as claimed in claim 14, wherein the computer-executable code also makes the computer system exist
Performance data is collected from the DB system during executing the 2nd DB sentence.
17. a kind of non-transient computer readable storage medium, the program code for having the computer being stored thereon executable,
The executable program code of the computer makes computer system execute following steps when being executed by a computer system:
Receive template file, the grammer of one or more DB sentences of the DB language of the template file descriptive data base DB system and
Syntax;
Meta data file is received, which defines test scene and include the metadata of DB mode, the DB mode
Metadata include the DB mode one or more DB tables metadata and the DB table data field first number
According to;
DB is generated according to specification defined in the grammer and syntax and the meta data file specified in the template file
Sentence, the DB sentence include the first DB sentence of the example for creating the DB mode and execute behaviour to the DB table of the DB mode
The 2nd DB sentence made;
The DB mode is instantiated in the DB system by executing the first DB sentence;
It executes the 2nd DB sentence and operation is executed with the DB table to the DB mode;And
Report that the DB system executes the performance of the 2nd DB sentence.
18. non-transient computer readable storage medium as claimed in claim 17, wherein the first DB sentence inserts data value
Enter in the DB table.
19. non-transient computer readable storage medium as claimed in claim 17, wherein computer system also executes following
Step: it obtains the data value in the DB table for being inserted into the DB mode, wherein the first DB sentence includes for by the number
The DB sentence in the DB table is inserted into according to value.
20. non-transient computer readable storage medium as claimed in claim 19, wherein at least one in the data value
It is randomly generated a bit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210374651.8A CN103714066B (en) | 2012-09-29 | 2012-09-29 | Database analysis device based on template |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210374651.8A CN103714066B (en) | 2012-09-29 | 2012-09-29 | Database analysis device based on template |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103714066A CN103714066A (en) | 2014-04-09 |
CN103714066B true CN103714066B (en) | 2019-10-22 |
Family
ID=50407055
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210374651.8A Active CN103714066B (en) | 2012-09-29 | 2012-09-29 | Database analysis device based on template |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103714066B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108334521B (en) * | 2017-01-19 | 2022-04-19 | 阿里巴巴集团控股有限公司 | Database capacity prediction method and device |
CN107783789B (en) * | 2017-11-01 | 2021-04-09 | 北京维普时代软件有限公司 | Demand development process method and demand development platform for project data |
CN109271326B (en) * | 2018-11-28 | 2021-03-12 | 优刻得科技股份有限公司 | Cloud database testing method and device, equipment and storage medium thereof |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1641639A (en) * | 2004-01-12 | 2005-07-20 | 英业达股份有限公司 | Multi data base query system and method thereof |
CN1744079A (en) * | 2004-08-30 | 2006-03-08 | 华为技术有限公司 | Database optimizing method |
CN101158975A (en) * | 2007-11-21 | 2008-04-09 | 金蝶软件(中国)有限公司 | Method and system for accessing distinct type data-base |
CN102486748A (en) * | 2010-12-02 | 2012-06-06 | 金蝶软件(中国)有限公司 | Method and device for performance test |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100306591A1 (en) * | 2009-06-01 | 2010-12-02 | Murali Mallela Krishna | Method and system for performing testing on a database system |
-
2012
- 2012-09-29 CN CN201210374651.8A patent/CN103714066B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1641639A (en) * | 2004-01-12 | 2005-07-20 | 英业达股份有限公司 | Multi data base query system and method thereof |
CN1744079A (en) * | 2004-08-30 | 2006-03-08 | 华为技术有限公司 | Database optimizing method |
CN101158975A (en) * | 2007-11-21 | 2008-04-09 | 金蝶软件(中国)有限公司 | Method and system for accessing distinct type data-base |
CN102486748A (en) * | 2010-12-02 | 2012-06-06 | 金蝶软件(中国)有限公司 | Method and device for performance test |
Also Published As
Publication number | Publication date |
---|---|
CN103714066A (en) | 2014-04-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110309071B (en) | Test code generation method and module, and test method and system | |
US8930918B2 (en) | System and method for SQL performance assurance services | |
CN108345532A (en) | A kind of automatic test cases generation method and device | |
Chen et al. | Big data system development: An embedded case study with a global outsourcing firm | |
US9311345B2 (en) | Template based database analyzer | |
Dit et al. | A tracelab-based solution for creating, conducting, and sharing feature location experiments | |
CN101996131A (en) | Automatic test method and automatic test platform for graphic user interface (GUI) based on x extensive makeup language (XML) packaging key word | |
CN110990274B (en) | Data processing method, device and system for generating test cases | |
CN109522228B (en) | Interface automation test data construction method, device, platform and storage medium | |
CN106886535A (en) | A kind of data pick-up method and apparatus for being adapted to multiple data sources | |
CN109902117A (en) | Operation system analysis method and device | |
US11615076B2 (en) | Monolith database to distributed database transformation | |
Paruma-Pabón et al. | Finding relationships between socio-technical aspects and personality traits by mining developer e-mails | |
CN109213826A (en) | Data processing method and equipment | |
CN114820080A (en) | User grouping method, system, device and medium based on crowd circulation | |
CN103714066B (en) | Database analysis device based on template | |
CN110941629B (en) | Metadata processing method, apparatus, device and computer readable storage medium | |
CN105511869A (en) | Demand tracking system and method based on user feedback | |
CN115169011A (en) | Editing system and application system of airplane assembly outline | |
Taleghani | Executive information systems development lifecycle | |
Sylim et al. | Development of a low-cost electronic data collection tool for a health facility survey: lessons learned in the field | |
CN112817971A (en) | Data processing method and system based on two-dimensional mapping table | |
Aljemabi et al. | Empirical study on the similarity and difference between VCS-DSN and BTS-DSN | |
Raja et al. | Investigating open source project success: a data mining approach to model formulation, validation and testing | |
CN115801599B (en) | Evaluation model construction method based on using section |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C53 | Correction of patent for invention or patent application | ||
CB02 | Change of applicant information |
Address after: German Waldo Applicant after: SAP AG Address before: German Waldo Applicant before: SAP AG |
|
COR | Change of bibliographic data |
Free format text: CORRECT: APPLICANT; FROM: SAP AG TO: SAP EUROPE AG |
|
EXSB | Decision made by sipo to initiate substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |