In the field of information technology (IT), a database, especially a relational database, is more and more widely used. A database is used to store tremendous amounts of data, and people usually use a Structured Query Language (SQL) statement to perform query, insertion, deletion and other operations on data in a relational database. Taking a SQL query statement (SELECT statement) for example, the statement indicates what kind of data is to be queried, but does not tell a relational database management system (RDBMS) how to query such data. There may be various possible ways to query the data. As a result, a RDBMS needs to parse the SQL statement, and generate according to various policies the most reasonable way of acquiring the data, called an access path. The access path is the specific steps regarding how to acquire the wanted data. A RDBMS executes the SQL statement according to the specific steps indicated by the access path, so as to finally acquire the queried data.
However, with the increasing complexity of a RDBMS, incorrect output of the SQL statement may occur. The reason for the incorrect output may be varied, but the main reason can be concluded as a defect or logic error in the RDBMS itself. Thus, how to test and verify correctness of a RDBMS becomes an important problem in the field of databases.
Currently, there are some technical solutions for verifying correctness of a database system, for example, a white box test and black box test. The so-called “white box test” refers to a design test case directly according to code logic of the database. Whereas the “black box test” refers to a write test case (generally, write various SQL statements) by using an external interface according to a functional description of a product without going deep into code. Since a database system itself is very complex, it is difficult for either the white box test or black box test to cover various conditions, and correctness of database system cannot be verified purposefully. Further, writing a test case is a time-consuming and tiring task, and a tester needs to thoroughly understand the database system, which greatly affects test efficiency.
USPTO Backgrounds
USPTO Backgrounds