||Faults are intolerable in database applications since these could result in unrecoverable data corruption. Database applications should be thoroughly tested before they are released to production. In this thesis, we study the utilization of white box testing techniques on database applications. We have found that conventional white box techniques have not explicitly considered input database instances in test cases generation. As such, faults that occur in some, but not all, database instances for the same test outcomes may not be detected. To address this, we propose a technique that transforms embedded SQL statements into query trees and examines input relations and relational algebraic operations in these query trees in the generation of test cases, which cover certain classes of input database instances and user inputs. In addition, we have found no previous work on the problem of test data preparation for database applications. Consequently, we introduce a framework for the generation of database instances and user inputs for testing database applications by reducing the problem of test data preparation to the problem of constraint satisfaction. The framework also allows utilization of domain knowledge for detecting faults common in the application domain.