SlideShare a Scribd company logo
1 of 2
Download to read offline
Database Testing:
Database testing is validating that the operation performed on antecedent tables and the results generated
from the operation is in accordance to the requirements and stored in the corresponding columns of
resultant table. And data on the user interface is mirror of the data stored in the data-base. There are many
aspects to the correctness of a database system, including; Does the application program behave as
specified? Are the data in the database accurate? Does the DBMS perform all insertions, deletions, and
updates of the data correctly? Does the database schema correctly reflect the organization of the real
world data being modeled?
Understanding of requirements and the properties of the database and DB-tester queries the DB and find
out whether the system is responding adequately. Following aspects of the DB should be validated to
answer the questions mentioned above:
• Data mapping
• ACID property validation
• Data integrity
• Business rule conformity
Data Mapping: In the software systems, data often travels back and forth from the UI (user interface) to
the backend DB and vice versa. So following are the aspects to look for:
• To check whether the fields in the UI/Front end forms are mapped consistently with the
corresponding DB table and column (and also the fields within). Typically this mapping
information is defined in the requirements documents.
• Whenever a certain action is performed in the front end of an application, a corresponding CRUD
(Create, Retrieve, Update and delete) action gets invoked at the back end. A tester will have to
check if the right action is invoked and the invoked action in itself is successful or not.
To test data mapping a tester should find fields and the corresponding tables and columns and also the
data type of that column from requirements, then give the inputs to the system; input with the data type
same as the defined in corresponding column and also with data type different from the declared data
type. Observe both the reactions and make report on it with the proper explanation.
If the user interface is not created then testing data mapping is not possible but the rejection and
acceptance of data on basis of data type can be tested using the “insert” statement of SQL.
ACID property validation: Acid stands for atomicity, consistency, isolation and durability. Every
transaction a DB performs has to stick firmly to these four properties.
• Atomicity: A transaction either fails or passes. This means that even if a single part of transaction
fails- it means that the entire transaction has failed. Usually this is called the “all-or nothing” rule.
This can be tested by first identifying the rules for completion of transaction. And then giving
input that satisfies the rule, input that partially satisfies the rule and an input that completely
disobey the rule. Observe all three of the operation and if the system passes one and fails other
two then it would be following the property of atomicity and if not then it’s not following the
property in its essence; in both cases make a report on both the scenario.
• Consistency: A transaction will always result in a valid state of the DB.
For this tester has to find out the valid state of DB after each transaction. After the identification
of valid states give the input for transactions to see whether or not the DB is in its valid state after
the transaction.
Isolation: If there are multiple transactions and they are executed all at once, the result/state of
the DB should be the same as if they were executed one after the other.
First identification of all transactions of the system from the requirements. Identifying the
dependent and independent transactions of the system, then giving input to the system for both
dependent and independent transactions. Observing that the independent transactions of the
system run parallel to each other without effecting the results of one another and the dependent
transactions does not start unless the input/object/field is fed to them.
• Durability: Once a transaction is done and committed, no external factors like power loss or
crash should be able to change it.
Data Integrity: This means that following any of the CRUD operations, the updated and most recent
values/Status of shared data should appear on all the forms and screens.
This is tested by updating (Delete, Update, Insert e.t.c.) DB and then cross checking on all the interfaces
that all are mirror of the most recent values/status of the database.
Business Rule conformity: More complex databases means more complicated components like
constraints, triggers, stored procedures, etc.
To validate this the tester has to identify all the constraints, triggers, stored procedures and their flow (the
purpose of these and there expected output). Then querying system in a way to cover up the flow of these
constraints, triggers, stored procedures and comparing the results of the queries with the results expected.
Conclusion:
Computer applications are more complex these days with technologies like web, android and also with
lots of smart phone apps. The more complex the front ends, the back ends are even more intricate. A
small mistake in the backend/DB could led the whole project to a failure. It is very important to start
testing it from start, because in complex system it is easier and cost effective to identify and fix a bug in
start then at the end.

More Related Content

What's hot

Analysis concepts and principles
Analysis concepts and principlesAnalysis concepts and principles
Analysis concepts and principlessaurabhshertukde
 
Language and Processors for Requirements Specification
Language and Processors for Requirements SpecificationLanguage and Processors for Requirements Specification
Language and Processors for Requirements Specificationkirupasuchi1996
 
Decision table
Decision tableDecision table
Decision tablejeebala
 
Analysis modeling & scenario based modeling
Analysis modeling &  scenario based modeling Analysis modeling &  scenario based modeling
Analysis modeling & scenario based modeling Benazir Fathima
 
12 couplingand cohesion-student
12 couplingand cohesion-student12 couplingand cohesion-student
12 couplingand cohesion-studentrandhirlpu
 
Not all objects are equal - strategies for designing testable code
Not all objects are equal - strategies for designing testable codeNot all objects are equal - strategies for designing testable code
Not all objects are equal - strategies for designing testable codeSagy Rozman
 
Testing database applications with QuickCheck
Testing database applications with QuickCheckTesting database applications with QuickCheck
Testing database applications with QuickCheckLaura M. Castro
 
States, state graphs and transition testing
States, state graphs and transition testingStates, state graphs and transition testing
States, state graphs and transition testinggeethawilliam
 
Crafted Design - GeeCON 2014
Crafted Design - GeeCON 2014Crafted Design - GeeCON 2014
Crafted Design - GeeCON 2014Sandro Mancuso
 
How much do we know about Object-Oriented Programming?
How much do we know about Object-Oriented Programming?How much do we know about Object-Oriented Programming?
How much do we know about Object-Oriented Programming?Sandro Mancuso
 
Black box Testing by Laraib
Black box Testing by Laraib Black box Testing by Laraib
Black box Testing by Laraib laraibalvi1
 
Couplingand cohesion student
Couplingand cohesion studentCouplingand cohesion student
Couplingand cohesion studentsaurabh kumar
 
Crafted Design - LJC World Tour Mash Up 2014
Crafted Design - LJC World Tour Mash Up 2014Crafted Design - LJC World Tour Mash Up 2014
Crafted Design - LJC World Tour Mash Up 2014Sandro Mancuso
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering Madhar Khan Pathan
 
Crafted Design - ITAKE 2014
Crafted Design - ITAKE 2014Crafted Design - ITAKE 2014
Crafted Design - ITAKE 2014Sandro Mancuso
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering Madhar Khan Pathan
 
Validation and Verification
Validation and VerificationValidation and Verification
Validation and Verificationmrmwood
 

What's hot (20)

Analysis concepts and principles
Analysis concepts and principlesAnalysis concepts and principles
Analysis concepts and principles
 
Language and Processors for Requirements Specification
Language and Processors for Requirements SpecificationLanguage and Processors for Requirements Specification
Language and Processors for Requirements Specification
 
Decision table
Decision tableDecision table
Decision table
 
Analysis modeling & scenario based modeling
Analysis modeling &  scenario based modeling Analysis modeling &  scenario based modeling
Analysis modeling & scenario based modeling
 
12 couplingand cohesion-student
12 couplingand cohesion-student12 couplingand cohesion-student
12 couplingand cohesion-student
 
Use case Diagram
Use case DiagramUse case Diagram
Use case Diagram
 
Not all objects are equal - strategies for designing testable code
Not all objects are equal - strategies for designing testable codeNot all objects are equal - strategies for designing testable code
Not all objects are equal - strategies for designing testable code
 
Testing database applications with QuickCheck
Testing database applications with QuickCheckTesting database applications with QuickCheck
Testing database applications with QuickCheck
 
States, state graphs and transition testing
States, state graphs and transition testingStates, state graphs and transition testing
States, state graphs and transition testing
 
Crafted Design - GeeCON 2014
Crafted Design - GeeCON 2014Crafted Design - GeeCON 2014
Crafted Design - GeeCON 2014
 
How much do we know about Object-Oriented Programming?
How much do we know about Object-Oriented Programming?How much do we know about Object-Oriented Programming?
How much do we know about Object-Oriented Programming?
 
2.1 usecase diagram
2.1 usecase diagram2.1 usecase diagram
2.1 usecase diagram
 
Black box Testing by Laraib
Black box Testing by Laraib Black box Testing by Laraib
Black box Testing by Laraib
 
Couplingand cohesion student
Couplingand cohesion studentCouplingand cohesion student
Couplingand cohesion student
 
Crafted Design - LJC World Tour Mash Up 2014
Crafted Design - LJC World Tour Mash Up 2014Crafted Design - LJC World Tour Mash Up 2014
Crafted Design - LJC World Tour Mash Up 2014
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering
 
Crafted Design - ITAKE 2014
Crafted Design - ITAKE 2014Crafted Design - ITAKE 2014
Crafted Design - ITAKE 2014
 
Ssad fp tech ii
Ssad fp tech iiSsad fp tech ii
Ssad fp tech ii
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering
 
Validation and Verification
Validation and VerificationValidation and Verification
Validation and Verification
 

Similar to DB Testing: Validate Data

Database Testing: A Detailed Guide
Database Testing: A Detailed GuideDatabase Testing: A Detailed Guide
Database Testing: A Detailed GuideEnov8
 
Database Testing.pptx
Database Testing.pptxDatabase Testing.pptx
Database Testing.pptxssuser88c0fd1
 
Software engg. pressman_ch-8
Software engg. pressman_ch-8Software engg. pressman_ch-8
Software engg. pressman_ch-8Dhairya Joshi
 
SE_Module2.pdf
SE_Module2.pdfSE_Module2.pdf
SE_Module2.pdfADARSHN40
 
The Clean Architecture
The Clean ArchitectureThe Clean Architecture
The Clean ArchitectureDmytro Turskyi
 
2012 the clean architecture by Uncle bob
2012 the clean architecture by Uncle bob 2012 the clean architecture by Uncle bob
2012 the clean architecture by Uncle bob GEORGE LEON
 
ISAS 600 – Database Project Phase III RubricAs the final ste.docx
ISAS 600 – Database Project Phase III RubricAs the final ste.docxISAS 600 – Database Project Phase III RubricAs the final ste.docx
ISAS 600 – Database Project Phase III RubricAs the final ste.docxbagotjesusa
 
Data Base Testing Interview Questions
Data Base Testing Interview QuestionsData Base Testing Interview Questions
Data Base Testing Interview QuestionsRita Singh
 
Software Engineering Important Short Question for Exams
Software Engineering Important Short Question for ExamsSoftware Engineering Important Short Question for Exams
Software Engineering Important Short Question for ExamsMuhammadTalha436
 
DQ Product Usage Methodology Highlights_v6_ltd
DQ Product Usage Methodology Highlights_v6_ltdDQ Product Usage Methodology Highlights_v6_ltd
DQ Product Usage Methodology Highlights_v6_ltdDigendra Vir Singh (DV)
 
CHAPTER FOUR buugii 2023.docx
CHAPTER FOUR buugii 2023.docxCHAPTER FOUR buugii 2023.docx
CHAPTER FOUR buugii 2023.docxRUKIAHASSAN4
 
Microsoft Sync Framework (part 1) ABTO Software Lecture Garntsarik
Microsoft Sync Framework (part 1) ABTO Software Lecture GarntsarikMicrosoft Sync Framework (part 1) ABTO Software Lecture Garntsarik
Microsoft Sync Framework (part 1) ABTO Software Lecture GarntsarikABTO Software
 
Introduction To Database.ppt
Introduction To Database.pptIntroduction To Database.ppt
Introduction To Database.pptRithikRaj25
 
Introduction to transaction management
Introduction to transaction managementIntroduction to transaction management
Introduction to transaction managementDr. C.V. Suresh Babu
 
Manual testing
Manual testingManual testing
Manual testingAjit Jain
 

Similar to DB Testing: Validate Data (20)

Database Testing: A Detailed Guide
Database Testing: A Detailed GuideDatabase Testing: A Detailed Guide
Database Testing: A Detailed Guide
 
Database Testing.pptx
Database Testing.pptxDatabase Testing.pptx
Database Testing.pptx
 
Chapter 4 u
Chapter 4 uChapter 4 u
Chapter 4 u
 
Software engg. pressman_ch-8
Software engg. pressman_ch-8Software engg. pressman_ch-8
Software engg. pressman_ch-8
 
SE_Module2.pdf
SE_Module2.pdfSE_Module2.pdf
SE_Module2.pdf
 
The Clean Architecture
The Clean ArchitectureThe Clean Architecture
The Clean Architecture
 
2012 the clean architecture by Uncle bob
2012 the clean architecture by Uncle bob 2012 the clean architecture by Uncle bob
2012 the clean architecture by Uncle bob
 
Active database
Active databaseActive database
Active database
 
ISAS 600 – Database Project Phase III RubricAs the final ste.docx
ISAS 600 – Database Project Phase III RubricAs the final ste.docxISAS 600 – Database Project Phase III RubricAs the final ste.docx
ISAS 600 – Database Project Phase III RubricAs the final ste.docx
 
Data Base Testing Interview Questions
Data Base Testing Interview QuestionsData Base Testing Interview Questions
Data Base Testing Interview Questions
 
Software Engineering Important Short Question for Exams
Software Engineering Important Short Question for ExamsSoftware Engineering Important Short Question for Exams
Software Engineering Important Short Question for Exams
 
Hw fdb(2)
Hw fdb(2)Hw fdb(2)
Hw fdb(2)
 
Hw fdb(2)
Hw fdb(2)Hw fdb(2)
Hw fdb(2)
 
DQ Product Usage Methodology Highlights_v6_ltd
DQ Product Usage Methodology Highlights_v6_ltdDQ Product Usage Methodology Highlights_v6_ltd
DQ Product Usage Methodology Highlights_v6_ltd
 
CHAPTER FOUR buugii 2023.docx
CHAPTER FOUR buugii 2023.docxCHAPTER FOUR buugii 2023.docx
CHAPTER FOUR buugii 2023.docx
 
Microsoft Sync Framework (part 1) ABTO Software Lecture Garntsarik
Microsoft Sync Framework (part 1) ABTO Software Lecture GarntsarikMicrosoft Sync Framework (part 1) ABTO Software Lecture Garntsarik
Microsoft Sync Framework (part 1) ABTO Software Lecture Garntsarik
 
Introduction To Database.ppt
Introduction To Database.pptIntroduction To Database.ppt
Introduction To Database.ppt
 
unit 1.pdf
unit 1.pdfunit 1.pdf
unit 1.pdf
 
Introduction to transaction management
Introduction to transaction managementIntroduction to transaction management
Introduction to transaction management
 
Manual testing
Manual testingManual testing
Manual testing
 

DB Testing: Validate Data

  • 1. Database Testing: Database testing is validating that the operation performed on antecedent tables and the results generated from the operation is in accordance to the requirements and stored in the corresponding columns of resultant table. And data on the user interface is mirror of the data stored in the data-base. There are many aspects to the correctness of a database system, including; Does the application program behave as specified? Are the data in the database accurate? Does the DBMS perform all insertions, deletions, and updates of the data correctly? Does the database schema correctly reflect the organization of the real world data being modeled? Understanding of requirements and the properties of the database and DB-tester queries the DB and find out whether the system is responding adequately. Following aspects of the DB should be validated to answer the questions mentioned above: • Data mapping • ACID property validation • Data integrity • Business rule conformity Data Mapping: In the software systems, data often travels back and forth from the UI (user interface) to the backend DB and vice versa. So following are the aspects to look for: • To check whether the fields in the UI/Front end forms are mapped consistently with the corresponding DB table and column (and also the fields within). Typically this mapping information is defined in the requirements documents. • Whenever a certain action is performed in the front end of an application, a corresponding CRUD (Create, Retrieve, Update and delete) action gets invoked at the back end. A tester will have to check if the right action is invoked and the invoked action in itself is successful or not. To test data mapping a tester should find fields and the corresponding tables and columns and also the data type of that column from requirements, then give the inputs to the system; input with the data type same as the defined in corresponding column and also with data type different from the declared data type. Observe both the reactions and make report on it with the proper explanation. If the user interface is not created then testing data mapping is not possible but the rejection and acceptance of data on basis of data type can be tested using the “insert” statement of SQL. ACID property validation: Acid stands for atomicity, consistency, isolation and durability. Every transaction a DB performs has to stick firmly to these four properties. • Atomicity: A transaction either fails or passes. This means that even if a single part of transaction fails- it means that the entire transaction has failed. Usually this is called the “all-or nothing” rule. This can be tested by first identifying the rules for completion of transaction. And then giving input that satisfies the rule, input that partially satisfies the rule and an input that completely disobey the rule. Observe all three of the operation and if the system passes one and fails other
  • 2. two then it would be following the property of atomicity and if not then it’s not following the property in its essence; in both cases make a report on both the scenario. • Consistency: A transaction will always result in a valid state of the DB. For this tester has to find out the valid state of DB after each transaction. After the identification of valid states give the input for transactions to see whether or not the DB is in its valid state after the transaction. Isolation: If there are multiple transactions and they are executed all at once, the result/state of the DB should be the same as if they were executed one after the other. First identification of all transactions of the system from the requirements. Identifying the dependent and independent transactions of the system, then giving input to the system for both dependent and independent transactions. Observing that the independent transactions of the system run parallel to each other without effecting the results of one another and the dependent transactions does not start unless the input/object/field is fed to them. • Durability: Once a transaction is done and committed, no external factors like power loss or crash should be able to change it. Data Integrity: This means that following any of the CRUD operations, the updated and most recent values/Status of shared data should appear on all the forms and screens. This is tested by updating (Delete, Update, Insert e.t.c.) DB and then cross checking on all the interfaces that all are mirror of the most recent values/status of the database. Business Rule conformity: More complex databases means more complicated components like constraints, triggers, stored procedures, etc. To validate this the tester has to identify all the constraints, triggers, stored procedures and their flow (the purpose of these and there expected output). Then querying system in a way to cover up the flow of these constraints, triggers, stored procedures and comparing the results of the queries with the results expected. Conclusion: Computer applications are more complex these days with technologies like web, android and also with lots of smart phone apps. The more complex the front ends, the back ends are even more intricate. A small mistake in the backend/DB could led the whole project to a failure. It is very important to start testing it from start, because in complex system it is easier and cost effective to identify and fix a bug in start then at the end.