Database testing - Wikipedia Database testing This article has multiple issues. Please help improve it or discuss these issues on the talk page. ( Learn how and when to remove these template messages ) This article may be too technical for most readers to understand. Please help improve it to make it understandable to non-experts, without removing the technical details. The talk page may contain suggestions. ( December 2011 ) This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. ( December 2011 ) This article is written like a personal reflection or opinion essay that states a Wikipedia editor 's personal feelings about a topic. Please help improve it by rewriting it in an encyclopedic style. ( December 2011 ) Database testing usually consists of a layered process, including the user interface ( UI ) layer, the business layer, the data access layer and the database itself. The UI layer deals with the interface design of the database, while the business layer includes databases supporting business strategies. Contents 1 Purposes 2 Types of testings and processes 2.1 Black - box 2.2 White - box 2.3 The WHODATE approach 3 Four stages 4 Basic techniques 5 See also 6 References 7 External links Purposes Databases, the collection of interconnected files on a server, storing information, may not deal with the same type of data, i.e. databases may be heterogeneous. As a result, many kinds of implementation and integration errors may occur in large database systems, which negatively affect the system 's performance, reliability, consistency and security. Thus, it is important to test in order to obtain a database system which satisfies the ACID properties ( Atomicity, Consistency, Isolation, and Durability ) of a database management system. One of the most critical layers is the data access layer, which deals with databases directly during the communication process. Database testing mainly takes place at this layer and involves testing strategies such as quality control and quality assurance of the product databases. Testing at these different layers is frequently used to maintain consistency of database systems, most commonly seen in the following examples : Data is critical from a business point of view. Companies such as Google or Symantec, who are associated with data storage, need to have a durable and consistent database system. If database operations such as insert, delete, and update are performed without testing the database for consistency first, the company risks a crash of the entire system. Some companies have different types of databases, and also different goals and missions. In order to achieve a level of functionality to meet said goals, they need to test their database system. The current approach of testing may not be sufficient in which developers formally test the databases. However, this approach is not sufficiently effective since database developers are likely to slow down the testing process due to communication gaps. A separate database testing team seems advisable. Database testing mainly deals with finding errors in the databases so as to eliminate them. This will improve the quality of the database or web - based system. Database testing should be distinguished from strategies to deal with other problems such as database crashes, broken insertions, deletions or updates. Here, database refactoring is an evolutionary technique that may apply. Types of testings and processes Black box and white box testing in database test The figure indicates the areas of testing involved during different database testing methods, such as black - box testing and white - box testing. Black - box Black - box testing involves testing interfaces and the integration of the database, which includes : Mapping of data ( including metadata ) Verifying incoming data Verifying outgoing data from query functions Various techniques such as Cause effect graphing technique, equivalence partitioning and boundary - value analysis. With the help of these techniques, the functionality of the database can be tested thoroughly. Pros and Cons of black box testing include : Test case generation in black box testing is fairly simple. Their generation is completely independent of software development and can be done in an early stage of development. As a consequence, the programmer has better knowledge of how to design the database application and uses less time for debugging. Cost for development of black box test cases is lower than development of white box test cases. The major drawback of black box testing is that it is unknown how much of the program is being tested. Also, certain errors can not be detected. White - box White - box testing mainly deals with the internal structure of the database. The specification details are hidden from the user. It involves the testing of database triggers and logical views which are going to support database refactoring. It performs module testing of database functions, triggers, views, SQL queries etc. It validates database tables, data models, database schema etc. It checks rules of Referential integrity. It selects default table values to check on database consistency. The techniques used in white box testing are condition coverage, decision coverage, statement coverage, cyclomatic complexity. The main advantage of white box testing in database testing is that coding error are detected, so internal bugs in the database can be eliminated. The limitation of white box testing is that SQL statements are not covered. The WHODATE approach WHODATE approach for SQL statement transformation While generating test cases for database testing, the semantics of SQL statement need to be reflected in the test cases. For that purpose, a technique called WHite bOx Database Application Technique `` ( WHODATE ) '' is used. As shown in the figure, SQL statements are independently converted into GPL statements, followed by traditional white box testing to generate test cases which include SQL semantics. Four stages Set Fixture Test run Outcome verification Tear down A set fixture describes the initial state of the database before entering the testing. After setting fixtures, database behavior is tested for defined test cases. Depending on the outcome, test cases are either modified or kept as is. The `` tear down '' stage either results in terminating testing or continuing with other test cases. For successful database testing the following workflow executed by each single test is commonly executed : Clean up the database : If the testable data is already present in the database, the database needs to be emptied. Set up Fixture : A tool like PHPUnit will then iterate over fixtures and do insertions into the database. Run test, Verify outcome and then Tear down : After resetting the database to empty and listing the fixtures, the test is run and the output is verified. If the output is as expected, the tear down process follows, otherwise testing is repeated. Basic techniques SQL Query Analyzer is a helpful tool when using Microsoft SQL Server. One commonly used function, create_input_dialog ( `` label '' ), is used to validate the output with user inputs. The design of forms for automated database testing, form front - end and back - end, is helpful to database maintenance workers. Data load testing : For data load testing, knowledge about source database and destination database is required. Workers check the compatibility between source database and destination database using the DTS package. When updating the source database, workers make sure to compare it with the target database. Database load testing measures the capacity of the database server to handle queries as well as the response time of database server and client. In database testing, issues such as atomicity, consistency, isolation, durability, integrity, execution of triggers, and recovery are often considered. The setup for database testing is costly and complex to maintain because database systems are constantly changing with expected insert, delete and update operations. Extra overhead is involved in order to determine the state of the database transactions. After cleaning up the database, new test cases have to be designed. An SQL generator is needed to transform SQL statements in order to include the SQL semantic into database test cases. See also Computer science portal Database normalization Software testing Unit testing References Jump up ^ Korth, Henry ( 2010 ). Database System Concepts. Macgraw - Hill. ISBN 978 - 0 - 07 - 352332 - 3. Jump up ^ Ambler, Scott ( 2003 ). Agile database Techniques : effective strategies for the agile software developer. wiley. ISBN 978 - 0 - 471 - 20283 - 7. Jump up ^ Pressman, Roger ( 1994 ). Software Tester : A Practitioner 's Approach. McGraw - Hill Education. ISBN 978 - 0 - 07 - 707732 - 7. Jump up ^ Zhang, Yanchun ( 1999 ). Cooperative databases and applications ' 99 : the proceedings of the Second International Symposium on Cooperative Database Systems for Advanced Applications ( CODAS ' 99 ), Wollongong, Australia, March 27 -- 28, 1999. Springer. ISBN 978 - 981 - 4021 - 64 - 7. Jump up ^ Kan, Stephen. Metrics & Models in Software Quality Engineering. Pearson Education. ISBN 978 - 81 - 297 - 0175 - 6. Jump up ^ `` InfoWorld ''. InfoWorld Media Group, Inc. 15 Jan 1996. Ambler, Scott W. ( 2006 ). `` Database Testing : How to Regression Test a Relational Database ''. Agiledata.org. Retrieved December 4, 2011. External link in publisher = ( help ) Zeichick, Alan ; et al. ( August 14, 1989 ). How We Tested Integrated Software Packages. InfoWorld. Retrieved December 4, 2011. External links Chapter 8. Database Testing, from PHPUnit Manual Creating Datasets for Testing Relational Databases SQL Test Coverage Acolyte Framework to mock up JDBC for persistence testing Retrieved from `` https://en.wikipedia.org/w/index.php?title=Database_testing&oldid=798063849 '' Categories : Database engines Database normalization Hidden categories : Wikipedia articles that are too technical from December 2011 All articles that are too technical Articles needing expert attention from December 2011 All articles needing expert attention Articles needing additional references from December 2011 All articles needing additional references Wikipedia articles needing style editing from December 2011 All articles needing style editing All articles with unsourced statements Articles with unsourced statements from January 2014 Articles with unsourced statements from January 2013 All Wikipedia articles needing clarification Wikipedia articles needing clarification from January 2013 CS1 errors : external links Articles created via the Article Wizard Talk Contents About Wikipedia Add links This page was last edited on 30 August 2017, at 19 : 35. Text is available under the Creative Commons Attribution - ShareAlike License ; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia ® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization. About Wikipedia

Question: the testing technique that deals with the internal logic and structure of the code is called
Answer: White-box testing