SlideShare a Scribd company logo
Data base testing
The definition of a database is a structured
collection of records or data that is stored in a
computer system. In order for a database to be
truly functional, it must not only store large
amounts of records well, but be accessed easily.
A database is a collection of information that is
organized so that it can easily be accessed,
managed, and updated.
 Data Definition Language (DDL) statements are
used to define the database structure or schema
 Data Manipulation Language (DML) statements are
used for managing data within schema objects.
They need to be committed, whereas DDL
commands are auto commit
 Data Control Language (DCL) are used to configure
and control database objects.
 Transaction Control (TCL) statements are used to
manage the changes made by DML statements. It
allows statements to be grouped together into
logical transactions.
 CREATE - to create objects in the database
 ALTER - alters the structure of the database
 DROP - delete objects from the database
 TRUNCATE - remove all records from a table,
including all spaces allocated for the records are
removed
 COMMENT - add comments to the data dictionary
 RENAME - rename an object
 SELECT - retrieve data from the database
 INSERT - insert data into a table
 UPDATE - updates existing data within a table
 DELETE - deletes all records from a table, the space
for the records remain as such
 CALL - call a PL/SQL or Java subprogram
 EXPLAIN PLAN - explain access path to data
 LOCK TABLE - control concurrency
 GRANT - gives user's access privileges to database
 REVOKE - withdraw access privileges given with the
GRANT command
 COMMIT - save work done
 SAVEPOINT - identify a point in a transaction to
which you can later roll back
 ROLLBACK - restore database to original since the
last COMMIT
 SET TRANSACTION - Change transaction options
like isolation level and what rollback segment to
use
 Select
SELECT column_name(s)
FROM table_name
Or
SELECT * FROM table_name
 Insert
INSERT INTO "table_name" ("column1", "column2",
...)
VALUES ("value1", "value2", ...)
Or
INSERT INTO "table1" ("column1", "column2", ...)
SELECT "column3", "column4", ...
FROM "table2"
Database testing involves testing the behavior of
the database when the application is being tested.
This may involve testing to see if values are being
inserted properly, flags are changing appropriately,
validity of data, to ensure if data integrity is
maintained. It may also account for performance
related to the database. SQL queries can be fired in
the database to check if the expected results are
achieved.
Database testing includes the following process:
1. Data validity testing – to perform this testing, one
should be good in SQL queries
2. Data integrity testing - to perform this testing,
the referential integrity and constraints should be
known.
3. Performance testing in relation with the
database - to perform this testing, one should be
good in structure of the table and its design.
4. Procedure testing and triggers testing – to
perform this testing, one should be good enough
to understand the program and logic flow.
Data validity is the correctness & reasonableness of
data.
Reasonableness means, for e.g. Account number
falling within a range, numeric data being all digits,
dates having all month, days & year, and spelling
of proper names. Data validity errors are probably
the most common and most difficult to detect.
Data integrity refers to the wholeness or
completeness of data during operations involving
transfer, storage and retrieval. It also refers to the
preservation of data so that whatever process it
undergoes through, it will still remain to be what it
has been intended for. In other words, data
integrity is the assurance that data will always be
correct, consistent and accessible.
Performance of the database can be increased by:-
 Design your database "properly" - a normalized
database design is usually a good starting point.
Occasionally you may have to denormalize
something, but only do so as a result of testing
showing the need, and AFTER optimizing the
database in the normalized design.
 Create indexes – Index columns that are frequently
used as important selection criteria, sort criteria,
and/or used in joins.
 Optimize your queries - While specifying the
column list as opposed to SELECT * is a best
practice, the performance impact is relatively small.
But constructing a query that returns as few rows
as possible and makes the best use of existing
indexes, etc. will make the biggest difference.
 Make the database do the work - construct SQL
queries (and/or stored procedures) that deliver
data as close to your "final product" as possible.
This means that you should minimize the number
of round trips - for instance, by minimizing the
number of queries to obtain a set of data.
Stored procedures are precompiled database
queries that improve the security, efficiency and
usability of database client/server applications.
A database trigger is procedural code that is
automatically executed in response to certain
events on a particular table or view in a database.
The trigger is mostly used for keeping the integrity
of the information on the database.
Let us take the example of a trigger say an update
trigger for the employee table. Now the logic here
is let's say when a row is modified (for eg.
Emp_name is being changed) that information
needs to be emailed to a person. We can use
triggers to do this. By setting a trigger on an action
we indirectly ensure that whenever that action
takes place the corresponding trigger will fire and
the commands in the trigger will get executed.
Triggers improve performance in database
Thank you

More Related Content

What's hot (20)

PPTX
DATABASE CONSTRAINTS
sunanditaAnand
 
PPTX
SQL Server Database Backup and Restore Plan
Hamid J. Fard
 
PPS
Jdbc architecture and driver types ppt
kamal kotecha
 
PPS
Database Testing
Ashvin Fofandi
 
PPTX
Denormalization
Amna Magzoub
 
PPT
MySql slides (ppt)
webhostingguy
 
PPTX
Backup and recovery in sql server database
Anshu Maurya
 
PPT
MySQL Functions
Compare Infobase Limited
 
PPTX
Bootstrap 4 ppt
EPAM Systems
 
PDF
Database Indexes
Sperasoft
 
PPT
Javascript
mussawir20
 
PPT
Oracle Sql Tuning
Chris Adkin
 
PPTX
Database connectivity to sql server asp.net
Hemant Sankhla
 
ODP
Partitioning
Reema Gajjar
 
PPT
Js ppt
Rakhi Thota
 
PPT
Java Collections Framework
Sony India Software Center
 
PPTX
Microsoft SQL Server Database Administration.pptx
samtakke1
 
PPT
1 - Introduction to PL/SQL
rehaniltifat
 
PPT
Data models
Dhani Ahmad
 
DATABASE CONSTRAINTS
sunanditaAnand
 
SQL Server Database Backup and Restore Plan
Hamid J. Fard
 
Jdbc architecture and driver types ppt
kamal kotecha
 
Database Testing
Ashvin Fofandi
 
Denormalization
Amna Magzoub
 
MySql slides (ppt)
webhostingguy
 
Backup and recovery in sql server database
Anshu Maurya
 
MySQL Functions
Compare Infobase Limited
 
Bootstrap 4 ppt
EPAM Systems
 
Database Indexes
Sperasoft
 
Javascript
mussawir20
 
Oracle Sql Tuning
Chris Adkin
 
Database connectivity to sql server asp.net
Hemant Sankhla
 
Partitioning
Reema Gajjar
 
Js ppt
Rakhi Thota
 
Java Collections Framework
Sony India Software Center
 
Microsoft SQL Server Database Administration.pptx
samtakke1
 
1 - Introduction to PL/SQL
rehaniltifat
 
Data models
Dhani Ahmad
 

Viewers also liked (14)

PDF
From Relational Database Management to Big Data: Solutions for Data Migration...
Cognizant
 
PDF
Testing the technology
Hamza Bhamla
 
PPTX
Security of the database
Pratik Tamgadge
 
PPT
Database Systems Security
amiable_indian
 
PDF
Database Security
Ferdous Pathan
 
PDF
Transaction Management - Lecture 11 - Introduction to Databases (1007156ANR)
Beat Signer
 
PDF
Database security issues
n|u - The Open Security Community
 
PPTX
Database Security
ShingalaKrupa
 
PPTX
Database security
Arpana shree
 
PPTX
Database security
Software Engineering
 
PPT
Database Management Systems (DBMS)
Dimara Hakim
 
PDF
management of distributed transactions
Nilu Desai
 
PPT
Databases: Concurrency Control
Damian T. Gordon
 
PPT
Database Security
alraee
 
From Relational Database Management to Big Data: Solutions for Data Migration...
Cognizant
 
Testing the technology
Hamza Bhamla
 
Security of the database
Pratik Tamgadge
 
Database Systems Security
amiable_indian
 
Database Security
Ferdous Pathan
 
Transaction Management - Lecture 11 - Introduction to Databases (1007156ANR)
Beat Signer
 
Database security issues
n|u - The Open Security Community
 
Database Security
ShingalaKrupa
 
Database security
Arpana shree
 
Database security
Software Engineering
 
Database Management Systems (DBMS)
Dimara Hakim
 
management of distributed transactions
Nilu Desai
 
Databases: Concurrency Control
Damian T. Gordon
 
Database Security
alraee
 
Ad

Similar to Data base testing (20)

PPTX
Testing Database Changes
Sazed Monsur
 
PPTX
SQL Sort Notes
ShivaAdasule
 
PPTX
PPT SQL CLASS.pptx
AngeOuattara
 
PDF
Sql a practical introduction
Hasan Kata
 
PDF
Sql a practical introduction
sanjaychauhan689
 
PDF
MIS5101 WK10 Outcome Measures
Steven Johnson
 
PDF
Sql a practical_introduction
investnow
 
PDF
Oracle
argusacademy
 
PPTX
SQL: Structured Query Language
Rohit Bisht
 
PPT
Chap 7
Karan Patil
 
PPTX
Database administration
Anish Gupta
 
PPTX
Database Basics
Abdel Moneim Emad
 
DOCX
Database testing
Pesara Swamy
 
PPTX
PostgreSQL Database Slides
metsarin
 
PPTX
Database
Bhandari Nawaraj
 
PPTX
Bank mangement system
FaisalGhffar
 
PPTX
Introduction to database & sql
zahid6
 
PPT
chap 7.ppt(sql).ppt
arjun431527
 
PPTX
Database management system by Neeraj Bhandari ( Surkhet.Nepal )
Neeraj Bhandari
 
PPT
data base manage ment
kaleemullah125
 
Testing Database Changes
Sazed Monsur
 
SQL Sort Notes
ShivaAdasule
 
PPT SQL CLASS.pptx
AngeOuattara
 
Sql a practical introduction
Hasan Kata
 
Sql a practical introduction
sanjaychauhan689
 
MIS5101 WK10 Outcome Measures
Steven Johnson
 
Sql a practical_introduction
investnow
 
Oracle
argusacademy
 
SQL: Structured Query Language
Rohit Bisht
 
Chap 7
Karan Patil
 
Database administration
Anish Gupta
 
Database Basics
Abdel Moneim Emad
 
Database testing
Pesara Swamy
 
PostgreSQL Database Slides
metsarin
 
Bank mangement system
FaisalGhffar
 
Introduction to database & sql
zahid6
 
chap 7.ppt(sql).ppt
arjun431527
 
Database management system by Neeraj Bhandari ( Surkhet.Nepal )
Neeraj Bhandari
 
data base manage ment
kaleemullah125
 
Ad

More from BugRaptors (20)

PPTX
Performance Testing - A Catalyst In Software Testing Landscape
BugRaptors
 
PDF
13 Things To Keep In Mind For Enhanced Mobile App UI/UX Design
BugRaptors
 
PPTX
Why Companies Need to Leverage ERP Testing Services?
BugRaptors
 
PPTX
BFSI Testing Solutions - To Streamline BFSI Sector
BugRaptors
 
PPTX
Media Streaming App Testing - Knowing The Significance
BugRaptors
 
PPTX
Manual Testing - Developing A Quick Perspective
BugRaptors
 
PDF
Regression Testing - An Overview
BugRaptors
 
PDF
Cloud Testing - Reinforcing Cloud Technology
BugRaptors
 
PPTX
Importance of Performance Testing.pptx
BugRaptors
 
PDF
Media & Entertainment Testing Services –BugRaptors
BugRaptors
 
PPTX
Usability Testing - Connect With Target Audience With Perfect UX
BugRaptors
 
PDF
Tips To Follow For A Simple QA Process
BugRaptors
 
PDF
CRM Testing Services - Ensure Smooth Functioning of Complex CRM Workflows
BugRaptors
 
PPTX
Test Automation - Everything You Need To Know
BugRaptors
 
PPTX
Stress testing ERP frameworks
BugRaptors
 
PDF
Top 10 Automation Testing Tools
BugRaptors
 
PPTX
Software Testing Trends For 2021
BugRaptors
 
PDF
Banking App Testing - To Evaluate Performance
BugRaptors
 
PDF
Test Automation Trends For 2021
BugRaptors
 
PPTX
ERP Testing Strategy For Large Scale Organizations
BugRaptors
 
Performance Testing - A Catalyst In Software Testing Landscape
BugRaptors
 
13 Things To Keep In Mind For Enhanced Mobile App UI/UX Design
BugRaptors
 
Why Companies Need to Leverage ERP Testing Services?
BugRaptors
 
BFSI Testing Solutions - To Streamline BFSI Sector
BugRaptors
 
Media Streaming App Testing - Knowing The Significance
BugRaptors
 
Manual Testing - Developing A Quick Perspective
BugRaptors
 
Regression Testing - An Overview
BugRaptors
 
Cloud Testing - Reinforcing Cloud Technology
BugRaptors
 
Importance of Performance Testing.pptx
BugRaptors
 
Media & Entertainment Testing Services –BugRaptors
BugRaptors
 
Usability Testing - Connect With Target Audience With Perfect UX
BugRaptors
 
Tips To Follow For A Simple QA Process
BugRaptors
 
CRM Testing Services - Ensure Smooth Functioning of Complex CRM Workflows
BugRaptors
 
Test Automation - Everything You Need To Know
BugRaptors
 
Stress testing ERP frameworks
BugRaptors
 
Top 10 Automation Testing Tools
BugRaptors
 
Software Testing Trends For 2021
BugRaptors
 
Banking App Testing - To Evaluate Performance
BugRaptors
 
Test Automation Trends For 2021
BugRaptors
 
ERP Testing Strategy For Large Scale Organizations
BugRaptors
 

Recently uploaded (20)

PPTX
IObit Uninstaller Pro 14.3.1.8 Crack Free Download 2025
sdfger qwerty
 
PDF
WholeClear Split vCard Software for Split large vCard file
markwillsonmw004
 
PPTX
IObit Driver Booster Pro Crack Download Latest Version
chaudhryakashoo065
 
PPTX
CONCEPT OF PROGRAMMING in language .pptx
tamim41
 
PDF
>Wondershare Filmora Crack Free Download 2025
utfefguu
 
PDF
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
PDF
Code Once; Run Everywhere - A Beginner’s Journey with React Native
Hasitha Walpola
 
PPTX
Android Notifications-A Guide to User-Facing Alerts in Android .pptx
Nabin Dhakal
 
PDF
Transparency into Your Software’s True Reach
team-WIBU
 
PPTX
Cubase Pro Crack 2025 – Free Download Full Version with Activation Key
HyperPc soft
 
PPTX
ERP - FICO Presentation BY BSL BOKARO STEEL LIMITED.pptx
ravisranjan
 
PDF
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 
PPTX
Mistakes to Avoid When Selecting Policy Management Software
Insurance Tech Services
 
PPTX
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
PDF
capitulando la keynote de GrafanaCON 2025 - Madrid
Imma Valls Bernaus
 
PDF
Rewards and Recognition (2).pdf
ethan Talor
 
PDF
2025年 Linux 核心專題: 探討 sched_ext 及機器學習.pdf
Eric Chou
 
PPTX
3uTools Full Crack Free Version Download [Latest] 2025
muhammadgurbazkhan
 
PPTX
Comprehensive Guide: Shoviv Exchange to Office 365 Migration Tool 2025
Shoviv Software
 
PPTX
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 
IObit Uninstaller Pro 14.3.1.8 Crack Free Download 2025
sdfger qwerty
 
WholeClear Split vCard Software for Split large vCard file
markwillsonmw004
 
IObit Driver Booster Pro Crack Download Latest Version
chaudhryakashoo065
 
CONCEPT OF PROGRAMMING in language .pptx
tamim41
 
>Wondershare Filmora Crack Free Download 2025
utfefguu
 
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
Code Once; Run Everywhere - A Beginner’s Journey with React Native
Hasitha Walpola
 
Android Notifications-A Guide to User-Facing Alerts in Android .pptx
Nabin Dhakal
 
Transparency into Your Software’s True Reach
team-WIBU
 
Cubase Pro Crack 2025 – Free Download Full Version with Activation Key
HyperPc soft
 
ERP - FICO Presentation BY BSL BOKARO STEEL LIMITED.pptx
ravisranjan
 
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 
Mistakes to Avoid When Selecting Policy Management Software
Insurance Tech Services
 
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
capitulando la keynote de GrafanaCON 2025 - Madrid
Imma Valls Bernaus
 
Rewards and Recognition (2).pdf
ethan Talor
 
2025年 Linux 核心專題: 探討 sched_ext 及機器學習.pdf
Eric Chou
 
3uTools Full Crack Free Version Download [Latest] 2025
muhammadgurbazkhan
 
Comprehensive Guide: Shoviv Exchange to Office 365 Migration Tool 2025
Shoviv Software
 
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 

Data base testing

  • 2. The definition of a database is a structured collection of records or data that is stored in a computer system. In order for a database to be truly functional, it must not only store large amounts of records well, but be accessed easily. A database is a collection of information that is organized so that it can easily be accessed, managed, and updated.
  • 3.  Data Definition Language (DDL) statements are used to define the database structure or schema  Data Manipulation Language (DML) statements are used for managing data within schema objects. They need to be committed, whereas DDL commands are auto commit  Data Control Language (DCL) are used to configure and control database objects.  Transaction Control (TCL) statements are used to manage the changes made by DML statements. It allows statements to be grouped together into logical transactions.
  • 4.  CREATE - to create objects in the database  ALTER - alters the structure of the database  DROP - delete objects from the database  TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed  COMMENT - add comments to the data dictionary  RENAME - rename an object
  • 5.  SELECT - retrieve data from the database  INSERT - insert data into a table  UPDATE - updates existing data within a table  DELETE - deletes all records from a table, the space for the records remain as such  CALL - call a PL/SQL or Java subprogram  EXPLAIN PLAN - explain access path to data  LOCK TABLE - control concurrency
  • 6.  GRANT - gives user's access privileges to database  REVOKE - withdraw access privileges given with the GRANT command
  • 7.  COMMIT - save work done  SAVEPOINT - identify a point in a transaction to which you can later roll back  ROLLBACK - restore database to original since the last COMMIT  SET TRANSACTION - Change transaction options like isolation level and what rollback segment to use
  • 8.  Select SELECT column_name(s) FROM table_name Or SELECT * FROM table_name
  • 9.  Insert INSERT INTO "table_name" ("column1", "column2", ...) VALUES ("value1", "value2", ...) Or INSERT INTO "table1" ("column1", "column2", ...) SELECT "column3", "column4", ... FROM "table2"
  • 10. Database testing involves testing the behavior of the database when the application is being tested. This may involve testing to see if values are being inserted properly, flags are changing appropriately, validity of data, to ensure if data integrity is maintained. It may also account for performance related to the database. SQL queries can be fired in the database to check if the expected results are achieved.
  • 11. Database testing includes the following process: 1. Data validity testing – to perform this testing, one should be good in SQL queries 2. Data integrity testing - to perform this testing, the referential integrity and constraints should be known. 3. Performance testing in relation with the database - to perform this testing, one should be good in structure of the table and its design. 4. Procedure testing and triggers testing – to perform this testing, one should be good enough to understand the program and logic flow.
  • 12. Data validity is the correctness & reasonableness of data. Reasonableness means, for e.g. Account number falling within a range, numeric data being all digits, dates having all month, days & year, and spelling of proper names. Data validity errors are probably the most common and most difficult to detect.
  • 13. Data integrity refers to the wholeness or completeness of data during operations involving transfer, storage and retrieval. It also refers to the preservation of data so that whatever process it undergoes through, it will still remain to be what it has been intended for. In other words, data integrity is the assurance that data will always be correct, consistent and accessible.
  • 14. Performance of the database can be increased by:-  Design your database "properly" - a normalized database design is usually a good starting point. Occasionally you may have to denormalize something, but only do so as a result of testing showing the need, and AFTER optimizing the database in the normalized design.  Create indexes – Index columns that are frequently used as important selection criteria, sort criteria, and/or used in joins.
  • 15.  Optimize your queries - While specifying the column list as opposed to SELECT * is a best practice, the performance impact is relatively small. But constructing a query that returns as few rows as possible and makes the best use of existing indexes, etc. will make the biggest difference.  Make the database do the work - construct SQL queries (and/or stored procedures) that deliver data as close to your "final product" as possible. This means that you should minimize the number of round trips - for instance, by minimizing the number of queries to obtain a set of data.
  • 16. Stored procedures are precompiled database queries that improve the security, efficiency and usability of database client/server applications.
  • 17. A database trigger is procedural code that is automatically executed in response to certain events on a particular table or view in a database. The trigger is mostly used for keeping the integrity of the information on the database.
  • 18. Let us take the example of a trigger say an update trigger for the employee table. Now the logic here is let's say when a row is modified (for eg. Emp_name is being changed) that information needs to be emailed to a person. We can use triggers to do this. By setting a trigger on an action we indirectly ensure that whenever that action takes place the corresponding trigger will fire and the commands in the trigger will get executed. Triggers improve performance in database