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

PPT
Database testing
PDF
Database testing tutorial
PPTX
SQL Queries Information
PPTX
Introduction to SQL
PPTX
Sql commands
PDF
İleri Seviye T-SQL Programlama - Chapter 21
PPTX
database language ppt.pptx
PPT
Introduction to structured query language (sql)
Database testing
Database testing tutorial
SQL Queries Information
Introduction to SQL
Sql commands
İleri Seviye T-SQL Programlama - Chapter 21
database language ppt.pptx
Introduction to structured query language (sql)

What's hot (20)

PPT
Sql join
PPTX
PPTX
Presentation slides of Sequence Query Language (SQL)
PPT
Introduction to SQL
PPTX
SQL Basics
PDF
SQL Joins and Query Optimization
PPTX
introdution to SQL and SQL functions
PPTX
Sqlmap
PPT
SQL Queries
PPTX
PPTX
What is SQL Server?
PPTX
1. SQL Basics - Introduction
PDF
View & index in SQL
PPT
Sql joins
PPTX
Joins in SQL
PPTX
Oracle: Joins
PDF
SQL Overview
PPTX
Sql queries presentation
PDF
Oracle SQL Basics
PPTX
Architecture of dbms(lecture 3)
Sql join
Presentation slides of Sequence Query Language (SQL)
Introduction to SQL
SQL Basics
SQL Joins and Query Optimization
introdution to SQL and SQL functions
Sqlmap
SQL Queries
What is SQL Server?
1. SQL Basics - Introduction
View & index in SQL
Sql joins
Joins in SQL
Oracle: Joins
SQL Overview
Sql queries presentation
Oracle SQL Basics
Architecture of dbms(lecture 3)
Ad

Viewers also liked (14)

PDF
From Relational Database Management to Big Data: Solutions for Data Migration...
PDF
Testing the technology
PPTX
Security of the database
PPT
Database Systems Security
PDF
Database Security
PDF
Transaction Management - Lecture 11 - Introduction to Databases (1007156ANR)
PDF
Database security issues
PPTX
Database Security
PPTX
Database security
PPTX
Database security
PPT
Database Management Systems (DBMS)
PDF
management of distributed transactions
PPT
Databases: Concurrency Control
PPT
Database Security
From Relational Database Management to Big Data: Solutions for Data Migration...
Testing the technology
Security of the database
Database Systems Security
Database Security
Transaction Management - Lecture 11 - Introduction to Databases (1007156ANR)
Database security issues
Database Security
Database security
Database security
Database Management Systems (DBMS)
management of distributed transactions
Databases: Concurrency Control
Database Security
Ad

Similar to Data base testing (20)

PPTX
Database Testing
PPTX
Testing Database Changes
PPTX
SQL Sort Notes
PPTX
PPT SQL CLASS.pptx
PDF
Sql a practical introduction
PDF
Sql a practical introduction
PDF
MIS5101 WK10 Outcome Measures
PDF
Sql a practical_introduction
PDF
Oracle
PPTX
SQL: Structured Query Language
PPT
Chap 7
PPTX
Database administration
PPTX
Database Basics
DOCX
Database testing
PPTX
PostgreSQL Database Slides
PPTX
PPTX
Bank mangement system
PPTX
Introduction to database & sql
PPT
chap 7.ppt(sql).ppt
PPTX
Database management system by Neeraj Bhandari ( Surkhet.Nepal )
Database Testing
Testing Database Changes
SQL Sort Notes
PPT SQL CLASS.pptx
Sql a practical introduction
Sql a practical introduction
MIS5101 WK10 Outcome Measures
Sql a practical_introduction
Oracle
SQL: Structured Query Language
Chap 7
Database administration
Database Basics
Database testing
PostgreSQL Database Slides
Bank mangement system
Introduction to database & sql
chap 7.ppt(sql).ppt
Database management system by Neeraj Bhandari ( Surkhet.Nepal )

More from BugRaptors (20)

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

Recently uploaded (20)

PDF
Build Multi-agent using Agent Development Kit
PPT
Introduction Database Management System for Course Database
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
The Role of Automation and AI in EHS Management for Data Centers.pdf
PDF
top salesforce developer skills in 2025.pdf
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
What to Capture When It Breaks: 16 Artifacts That Reveal Root Causes
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
AIRLINE PRICE API | FLIGHT API COST |
PDF
How to Confidently Manage Project Budgets
PPTX
ai tools demonstartion for schools and inter college
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
L1 - Introduction to python Backend.pptx
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Mastering-Cybersecurity-The-Crucial-Role-of-Antivirus-Support-Services.pptx
PPTX
Online Work Permit System for Fast Permit Processing
PDF
medical staffing services at VALiNTRY
Build Multi-agent using Agent Development Kit
Introduction Database Management System for Course Database
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
The Role of Automation and AI in EHS Management for Data Centers.pdf
top salesforce developer skills in 2025.pdf
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
What to Capture When It Breaks: 16 Artifacts That Reveal Root Causes
ManageIQ - Sprint 268 Review - Slide Deck
VVF-Customer-Presentation2025-Ver1.9.pptx
PTS Company Brochure 2025 (1).pdf.......
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
AIRLINE PRICE API | FLIGHT API COST |
How to Confidently Manage Project Budgets
ai tools demonstartion for schools and inter college
How to Choose the Right IT Partner for Your Business in Malaysia
L1 - Introduction to python Backend.pptx
2025 Textile ERP Trends: SAP, Odoo & Oracle
Mastering-Cybersecurity-The-Crucial-Role-of-Antivirus-Support-Services.pptx
Online Work Permit System for Fast Permit Processing
medical staffing services at VALiNTRY

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