This document provides information on testing a database. It discusses installing MySQL, what database testing involves, the differences between user interface testing and data testing, types of database testing including structural, functional and nonfunctional testing. Structural testing involves testing tables, schemas, triggers, stored procedures and views. Functional testing checks database functionality from a user perspective. Nonfunctional testing focuses on load, stress and performance.
Database Testing 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.
According to our customer surveys and confirmed by industry statistics, manual testers spend 50-70% of their effort on finding and preparing appropriate test data. Considering the fact that manual testing still accounts for 80+% of test operation efforts, up to half (!) of the overall testing effort goes into dealing with test data.
Find out how Tosca Testsuite can help you to lower the maintenance effort of your test data and operating costs of your test environment while building an efficient test data management strategy.
Database Testing 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.
According to our customer surveys and confirmed by industry statistics, manual testers spend 50-70% of their effort on finding and preparing appropriate test data. Considering the fact that manual testing still accounts for 80+% of test operation efforts, up to half (!) of the overall testing effort goes into dealing with test data.
Find out how Tosca Testsuite can help you to lower the maintenance effort of your test data and operating costs of your test environment while building an efficient test data management strategy.
How To Write A Test Case In Software Testing | EdurekaEdureka!
YouTube Link: https://youtu.be/KxelISpFqOY
(** Test Automation Masters Program: https://www.edureka.co/masters-progra... **)
This Edureka PPT on "Test Case in Software Testing" will give you in-depth knowledge on how to write a Test Case in Software Testing. The following are the topics covered in the session:
Software Testing Documentation
Test Case in Software Testing
Test Case Format
Test Case Design Technique
Test Case Guidelines
Demo: How to write a test case?
Selenium playlist: https://goo.gl/NmuzXE
Selenium Blog playlist: http://bit.ly/2B7C3QR
Software Testing Blog playlist: http://bit.ly/2UXwdJm
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Slides are created to demonstrate about ETL Testing, some one who want to start and learn ETL Tesing can make use of this ppt. It includes contents related all ETL Testing schema
Non-functional testing is the testing of a software application or system for its non-functional requirements: the way a system operates, rather than specific behaviours of that system.
In this quality assurance training session, you will learn Test Execution. Topics covered in this course are:
• Test Execution and its purpose
• Entry and Exit Criteria
• Test Execution and its cycles
• Testing Methodology (BBT , WBT)
• Class Assignment
TO know more, visit this link: https://www.mindsmapped.com/courses/quality-assurance/get-practical-training-on-software-testing-quality-assurance-qa/
As technology develops, software programs become more complex and more fragile. In addition to high functionality and seamless user interaction, aesthetics and presentation are increasingly significant in apps. Database testing is now crucial for assessing an application's databases effectively. Here are all the things you need to know about database testing.
Data of any application is always critical from a business perspective. If basic database operations such as insert, update delete are performed without testing database for consistency then there is a risk of entire system crash. Database testing is nothing but finding errors in the databases to eliminate them.
How To Write A Test Case In Software Testing | EdurekaEdureka!
YouTube Link: https://youtu.be/KxelISpFqOY
(** Test Automation Masters Program: https://www.edureka.co/masters-progra... **)
This Edureka PPT on "Test Case in Software Testing" will give you in-depth knowledge on how to write a Test Case in Software Testing. The following are the topics covered in the session:
Software Testing Documentation
Test Case in Software Testing
Test Case Format
Test Case Design Technique
Test Case Guidelines
Demo: How to write a test case?
Selenium playlist: https://goo.gl/NmuzXE
Selenium Blog playlist: http://bit.ly/2B7C3QR
Software Testing Blog playlist: http://bit.ly/2UXwdJm
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Slides are created to demonstrate about ETL Testing, some one who want to start and learn ETL Tesing can make use of this ppt. It includes contents related all ETL Testing schema
Non-functional testing is the testing of a software application or system for its non-functional requirements: the way a system operates, rather than specific behaviours of that system.
In this quality assurance training session, you will learn Test Execution. Topics covered in this course are:
• Test Execution and its purpose
• Entry and Exit Criteria
• Test Execution and its cycles
• Testing Methodology (BBT , WBT)
• Class Assignment
TO know more, visit this link: https://www.mindsmapped.com/courses/quality-assurance/get-practical-training-on-software-testing-quality-assurance-qa/
As technology develops, software programs become more complex and more fragile. In addition to high functionality and seamless user interaction, aesthetics and presentation are increasingly significant in apps. Database testing is now crucial for assessing an application's databases effectively. Here are all the things you need to know about database testing.
Data of any application is always critical from a business perspective. If basic database operations such as insert, update delete are performed without testing database for consistency then there is a risk of entire system crash. Database testing is nothing but finding errors in the databases to eliminate them.
Why Back-end is the most important part of the systemBugRaptors
BugRaptors is expertise in backend testing as checking tables, writing queries and procedures. We perform testing in web application or desktop and database can be used in the application like SQL or Oracle. We perform database testing on many projects like banking, finance, health insurance which requires extensive database testing. We are also expertise in “Data Migration” testing in which we migrates the client’s database into our local database and then compare both database by executing the sql queries.
A Short and Sweet Guide to Test Data DevelopmentEnov8
Database testing and test data development are essential steps in any software testing method because the data evaluates and runs the process. Without adequate testing, the database may quickly become so vast that it slows the entire system. All types of database tests used for test runs have their own set of datasets that can be developed through test data generation.
Chapter 3 - Performance Testing in the Software LifecycleNeeraj Kumar Singh
This is chapter 3 of ISTQB Specialist Performance Tester certification. This presentation helps aspirants understand and prepare the content of the certification.
Software Project Management: Testing DocumentMinhas Kamal
Software Project Management: ResearchColab- Testing Document (Document-11)
Presented in 4th year of Bachelor of Science in Software Engineering (BSSE) course at Institute of Information Technology, University of Dhaka (IIT, DU).
These slides is from a session about load testing. It starts with an introduction to non-functional testing then demonstrating the phases and criteria of load testing with K6.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
2. Install MySQL using the link
https://dev.mysql.com/downloads/mysql/
Youtube link:For installation process
https://www.youtube.com/watch?v=OEE4xR10Ubo&list=PLUDwpEzHYYLt0aRs
7gvyEEviMp_CoTO3q
For MacOS:
https://youtu.be/2cvH0HRjZF8
3. What is database testing?
Database Testing is a type of software testing that checks the schema, tables,
triggers, etc. of the Database under test. It also checks data integrity and
consistency. It may involve creating complex queries to load/stress test the
Database and check its responsiveness.
The Database is one of the inevitable parts of a Software Application.
It does not matter whether it is a web, desktop or mobile, client-server, peer-
to-peer, enterprise, or individual business; the Database is required everywhere
at the backend.
Similarly, whether it is Healthcare, Finance, Leasing, Retail, Mailing application,
or controlling a spaceship; a Database is always in action behind the scene.
As the complexity of application increases, the need for a stronger and secure
Database emerges. In the same way, for the applications with a high frequency
of transactions (For Example, Banking or Finance application), the necessity of
a fully-featured DB Tool is coupled.
4. Differences between User-Interface Testing
and Data Testing
Database Testing UI Testing
Database testing is known as data validation and integrity testing or
back-end testing.
UI testing or front-end testing is also called Application testing or GUI
testing.
Database testing involves testing of back-end components, which are
not visible to users.
This includes database components and DBMS systems such as My SQL,
Oracle.
UI testing involves checking functionalities of an application and its
components like forms, graphs, menus, reports, etc.
These components are created using front-end development tools like
VB.net, C#, Delphi, etc.
Database testing involves checking stored procedures, views, schemas
in database, tables, indexes, keys, triggers, data validations and data
consistence check.
UI testing involves checking the functionality of application, buttons,
forms and fields, calendar and images, navigation from one page to
other, and the overall functionality of the application.
To perform DB testing, a tester needs a thorough knowledge of database
concept − like procedures and functions, views, indexes, keys and good
hands-on SQL.
To perform UI testing, a tester needs a good understanding of business
requirements, application functional knowledge, coding, etc.
Data comes from multiple heterogeneous data sources over web
applications, Intranet applications and various other applications.
Data is entered manually into applications. It involves functional testing
of front-end applications.
5. Types of Database Testing
Based on the function and structure of a database, DB testing can be categorized
into three categories −
Structural Database Testing − It deals with table and column testing, schema
testing, stored procedures and views testing, checking triggers, etc.
Functional Testing − It involves checking functionality of database from user
point of view. Most common type of Functional testing are White box and
black box testing.
Nonfunctional Testing − It involves load-testing, risk testing in database,
stress testing, minimum system requirements, and deals with the
performance of the database.
6. Structural Database Testing
Structural Database Testing is a database testing technique that validates all the elements
inside data repository that are mainly used for data storage and which are not allowed to be
directly manipulated by end-users. The validation of database servers is also an important
consideration in structural database testing. A successful completion of this testing needs
mastery in SQL queries.
Schema / Mapping Testing:
It involves validating the objects of front-end application with database object mapping.
In Schema Testing −
Sometimes it happens that the end user application objects are not correctly mapped or
compatible with database objects. Therefore, checking the validation of the various schema
formats associated with the databases is required.
It is required to find the unmapped objects in database, like tables, views, columns etc. is
required.
There are various tools in the market that can be used to perform object mapping in schemas.
Example − In Microsoft SQL Server, a tester can write simple queries to check and validate schemas
in the database.
If the tester wants to make changes to a table structure, he/she should ensure that all
the stored procedures having that table are compatible with this change.
8. Structural Database Testing
Tables and Column testing
The key areas covered in this testing are −
Validating the data types in the database to field values in front-end application.
Validating the length of data field in database to length of data types in the
application.
Checking if there are any unmapped tables or columns in the database from
application field objects.
Naming conventions of database tables and columns are verified, if they are in
accordance with business requirement or not.
Validating the Keys and Indexes in the database, i.e., primary and foreign keys in
tables are defined as per requirement.
Check if the primary keys and their corresponding foreign keys are same in two
tables.
Check Unique and NOT NULL characteristics of keys are maintained.
Length and data type of keys and indexes are maintained as per requirement.
9. Structural Database Testing
Trigger Testing
In trigger testing, a tester needs to ensure the following −
Whether the coding conventions are followed during the coding phase of the
triggers.
See the triggers executed meets the required conditions.
Whether the trigger updates the data correctly, once they have been executed.
Validation of Update/Insert/Delete triggers functionality w.r.t application under
test.
10. Structural Database Testing
A stored procedure is a prepared SQL code that you can save, so the code can be
reused over and over again.
Stored Procedures and Views Testing
In this testing, a tester ensures that the manual execution of stored procedures
and views generate the required result.
The tester ensures −
If it enables the required triggers to be executed as expected.
If the development team has covered all the loops and conditions by passing input
to applications in the procedures.
If there are any unused stored procedures in the database.
TRIM operations are applied properly when the data is fetched from required
tables in database.
Validation of the overall integration of the stored procedure modules as per as the
requirements of the application under test.
Exception and error handling mechanisms are followed.
The most common tools that are used to perform stored procedures testing
are LINQ, SP Test tool, etc.
11. Structural Database Testing
Database Server Check
Database Server check involves verifying −
If the database server can handle the expected number of transactions as per the
business requirement.
If the configuration details of database servers meets the business requirement.
If the user authorization is maintained as per requirement.
12. Functional Testing
Functional testing is performed keeping in mind an end-user point of view; whether the
required transactions and operations run by the end-users meet the business specifications.
Black Box Testing
Black Box Testing involves verifying the integration of database to check the functionality.
The test cases are simple and are used to verify incoming data and outgoing data from the
function.
Various techniques such as cause-effect graphing technique, equivalence partitioning and
boundary-value analysis are used to test the functionality of the database.
Its advantages are as follows −
It is fairly simple and is performed in the early stages of development.
Cost of developing test-cases is less as compared to white-box testing.
Its disadvantages are as follows −
A few errors cannot be detected
It is unknown how much program needs to be tested.
13. Functional Testing
White Box Testing
White Box Testing deals with the internal structure of the database and the specification
details are hidden from the users. 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. This type
of testing 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 most common techniques used to perform white box testing are condition coverage,
decision coverage, statement coverage, etc.
Coding errors can be detected in white-box testing, so internal bugs in the database can be
eliminated. The limitation of white-box testing is that SQL statements are not covered.
14. Nonfunctional Testing
Nonfunctional testing involves performing load testing, stress testing, checking
minimum system requirements to meet business specification, risk finding and
performance optimization of database.
Load Testing
The primary target of load testing is to check if most running transactions
have performance impact on the database.
In Load testing, the tester checks −
The response time for executing the transactions for multiple remote users.
Time taken by the database to fetch specific records.
15. Nonfunctional Testing
Stress Testing
Stress testing is performed to identify the system breakpoint. In this testing,
application is loaded in such a way that the system fails at one point. This
point is called the breakpoint of database system.
Determining the state of database transactions involves a significant amount
of effort. Proper planning is required to avoid any time and cost-based issues.
The most commonly used stress testing tools
are LoadRunner and WinRunner.
16. Process
The process to perform database testing is similar to testing of other
applications. DB testing can be described with key processes given below.
Set up the environment
Run a test
Check the test result
Validate according to the expected results
Report the findings to the respective stakeholders
Various SQL statements are used to develop the Test cases. The most common
SQL statement, which is used to perform DB testing, is the Select statement.
Apart from this, various DDL, DML, DCL statements can also be used.
17. Techniques
Database Schema Testing
Verifying Databases and devices
Verifying the name of database
Verifying the data device, log device and dump device
Verifying if enough space allocated for each database
Verifying database option setting
Tables, columns, column types rules check
Verify the items given below to find out the differences between actual and applied setting.
Name of all the tables in database
Column names for each table
Column types for each table
NULL value checked or not
Whether a default is bound to correct table columns
Rule definitions to correct table names and access privileges
Key and Indexes
Verify the Key and indexes in each table −
Primary key for each table
Foreign keys for each table
Data types between a foreign key column and a column in other table Indices, clustered or non-clustered unique or not unique
18. Stored Procedure Tests
It involves checking whether a stored procedure is defined and the output results are compared. In a Stored Procedure test, the following
points are checked −
Stored procedure name
Parameter names, parameter types, etc.
Output − Whether the output contains many records. Zero rows are effected or only a few records are extracted.
What is the function of Stored Procedure and what a stored procedure is not supposed to do?
Passing sample input queries to check if a stored procedure extracts correct data.
Stored Procedure Parameters − Call stored procedure with boundary data and with valid data. Make each parameter invalid once and run a
procedure.
Return values − Check the values that are returned by stored procedure. In case of a failure, nonzero must be returned.
Error messages check − Make changes in such a way that the stored procedure fails and generate every error message at least once. Check
any exception scenarios when there is no predefined error message.
Trigger Tests
In a Trigger test, the tester must perform the following tasks −
Make sure the trigger name is correct.
Validate the trigger if it is generated for a specific table column.
Trigger’s update validation.
Update a record with a valid data.
Update a record with invalid data and cover every trigger error.
Update a record when it is still referenced by a row in other table.
Ensure rolling back transactions when a failure occurs.
Find out any cases in which a trigger is not supposed to roll back transactions.
19. Functional Testing Method
Functional testing can be performed by dividing the database into modules as per functionality.
The functionalities are of the following two types −
Type 1 − In Type 1 testing, find out the features of the project. For each major feature, find
out the schema, triggers, and stored procedures responsible to implement that function and
put them into a functional group. Then test each group together.
Type 2 − In Type 2 testing, the border of functional groups in a back-end is not obvious. You
can check the data flow and see where you can check the data. Start from the front-end.
The following process takes place −
When a service has a request or saves data, some stored procedures will get called.
The procedures will update some tables.
Those stored procedures will be the place to start testing and those tables will be the place
to check the test results.
20. Stress Testing
Stress Testing involves getting a list of major database functions and
corresponding stored procedures. Follow the steps given below for Stress
Testing −
Write test scripts to try those functions and every function must be checked
at least once in a full cycle.
Perform the test scripts again and again for a specific time period.
Verifying the log files to check any deadlocks, failure out of memory, data
corruption, etc.
21. Testing a Database via Front-end
Back-end bugs can also be found sometimes by doing front-end testing. You can follow
the simple steps given below to detect bugs by front-end testing.
Write queries from the front-end and issue the searches.
Pick up an existing record, change the values in some fields, and save the record.
(It involves the UPDATE statement or update stored procedures and update
triggers.)
Insert a new menu item in the front-end window. Fill in the information and save
the record. (It involves the INSERT statements or insertion stored procedures and
deletion triggers.)
Pick up an existing record, click on the DELETE or REMOVE button, and confirm the
deletion. (It involves the DELETE statement or deletion stored procedures and
deletion triggers.)
Repeat these test-cases with invalid data and see how the database responds.
22. Scenarios
Structured Database Testing
Common database scenarios with respect to Structured Database Testing are
given below −
Verifying the name of database, verifying the data device, log device and
dump device, verifying if enough space allocated for each database and
verifying database option setting.
Names of all the tables in database, column names for each table, column
types for each table, null value check or not. Verify the Key and indexes in
each table: Primary key for each table, foreign keys for each table.
Data types between a foreign key column and a column in other table Indices,
clustered or non-clustered unique or not unique.
23. Scenarios
Functional Database Testing
Common Database Test scenarios with respect to Functional Database
Testing are −
Finding out the schema, triggers and stored procedures responsible to
implement that function and make them into a functional group and then
each group can be tested together.
Check data flow and see where you can check the data. Start from the front-
end.
24. Scenarios
Non-Functional Database Testing
Common Database Test scenarios with respect to Non-Functional Database Testing are −
Write test scripts to try major functions and every function must be checked at least once in
a full cycle.
Perform the test scripts again and again for a specific time period.
Verifying the log files to check any deadlock, failure out of memory, data corruption, etc.
Write queries from a front end and issue the searches. Pick up an existing record, change
values in some fields and save the record. (It involves UPDATE statement or update stored
procedures, update triggers.)
Insert a new menu item in a front-end window. Fill in information and save the record. (It
involves INSERT statements or insertion stored procedures, deletion triggers.)
Pick up an existing record, click on the DELETE or REMOVE button, and confirm the deletion.
(It involves DELETE statement or deletion stored procedures, deletion triggers.)
Repeat these test-cases with invalid data and see how the database responds.
25. Data integrity
Data Integrity is important in a database. It includes data validation before insertion,
updates, and deletion. Triggers must be in place to validate reference table records.
For checking Data Integrity, you need to perform the following operations −
You need to check major columns in each table and verify if any incorrect data
exists. (Characters in name field, negative percentage, etc.)
Find out inconsistent data and insert them into relevant tables and see if any
failure occurs.
Insert a child data before inserting its parent’s data. Try to delete a record that is
still referenced by the data in another table.
If a data in a table is updated, check whether the other relevant data is updated
as well. You need to ensure that replicated servers or databases are in sync and
contain consistent information.
26. Data Mapping
Given below are the key aspects of Data Mapping −
To check the fields in the UI/Front end forms and mapped consistently with the corresponding DB
table. This mapping information is defined in the requirements documents as mentioned above.
For any action performed in the front end of an application, a corresponding CRUD ‘Create,
Retrieve, Update and delete’ action gets initiated 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.
Steps in Data Mapping Testing
Given below are the steps followed for Data Mapping Testing −
Step 1 − First check for syntax error in each script.
Step 2 − Next is to check for table mapping, column mapping, and data type mapping.
Step 3 − Verify lookup data mapping.
Step 4 − Run each script when records do not exist in destination tables.
Step 5 − Run each script when the records already exist in the destination tables.
27. Backup
The most important part of an organizational growth is its data. In case of a system failure, there is a
need to restore the data. Back up is an exact copy of the database, which helps you to restore your
data in case of any data loss.
Types of Data Backups
There are two types of backup that can be used −
Physical Backups − Physical backup includes taking back up using third-party backup tools like
Veritas Net Back, IBM Tivoli Manager or user manager backups using OS utilities.
Logical Backups − Logical backup of database includes taking backups of logical objects like
tables, indexes, procedures, etc.
Example − One of common tool to take data backup is Oracle Recovery Manager (RMAN) that is an
Oracle utility to take database backup.
RMAN consists of two components −
Target database for which backup is required.
RMAN client is used to run commands to take data backup.
BACKUP VALIDATE is used to test if you are able to make a valid backup of database files. It ensures
−
If backup is in place for physical or logical objects of database.
If regular backups are set up for invaluable data.
If the backup tool meets the backup requirements of an organization.
28. Challenges
Testing scope is too large
A tester needs to identify the test items in database testing otherwise he may not
have a clear understanding of what he would test and what he would not test.
Therefore, if you are clear on the requirement, you may waste a lot of time
testing uncritical objects in the database.
When you have a list of objects to test, next is to estimate the effort required to
design the tests and execute the tests for each test item. Depending on their
design and data size, some database tests may take a long time to execute.
As the database size is too large, it becomes a big challenge to find out the
objects that have to be tested and those which are to be left out.
Scaled-down test database
Normally testers are provided with a copy of the development database to test.
That database only have little data, which is sufficient to run the application. So
there is a need to test the development, staging and as well as production
database system.
29. Challenges
Changes in database structure
This is one of the common challenges in DB testing. Sometimes, it happens that you design
or execute a test, and the database structure has been changed at that time. This is
necessary that you should be aware of the changes made to the database during testing.
Once the database structure changes, you should analyze the impact of the changes and
modify the tests. In addition, if multiple users use the test database, you would not be
sure about the test results so you should ensure that the test database is used for testing
purpose only.
Another challenge in DB testing is that you run multiple tests at the same time. You should
run one test at a time at least for the performance tests. You do not want your database
performing multiple tasks and under-reporting performance.
Complex test plans
The database structure is normally complex and it has huge data, so there is a possibility
that you are executing incomplete or same tests repeatedly. So there is a need to create a
test plan and proceed accordingly and checking the progress regularly.
Good understanding of SQL
To test a database, you should have a good knowledge of SQL queries and the required
database management tools.
30.
31. Database Architecture in DBMS: 1-Tier, 2-
Tier and 3-Tier
DBMS are divided into multiple modules for better functioning. DBMS makes
use of the fundamental concept of client-server architecture. In this type of
model, the servers distribute the internet services and system solutions to the
requested clients. Servers and Clients are present in the same system and are
connected through a single internet network. To understand the structure of
DBMS, they are classified into three types based on their build architecture:
One-Tier Architecture
One tier Client/Server architecture is the type of architecture where the user or
the programmer can directly work on the DBMS. The changes or alterations
made here will reflect on the database itself. Although this type is best-suited for
programmers or administrators, and the end-users may not benefit from it.
Sysops (system operators) use this type of architecture for development
purposes.
32. Database Architecture in DBMS: 1-Tier, 2-
Tier and 3-Tier
Two-Tier Architecture
This type of architecture benefits the end-users a bit more. This type of DBMS works
as a two-way system. Unlike the one-tier architecture, the end-user can establish a
direct connection with the database using APIs. For this, ODBC (Open Database
Connectivity) drivers are used. These drivers create an interface between the
database (present on the server-side) and application program (present on the client-
side). Once the client/server connection is secured, DBMS functionalities are ready to
use. The user can now operate, manipulate, or optimize data.
Three-Tier Architecture
In this type of architecture, another layer is sandwiched between the client-side and
the server-side. This intermediate layer is called the Application Layer. This layer is
responsible for storing connectivity software and holds data transfer limitations. This
layer makes sure that the right amount of data is being processed and transferred
from the database to the client-side. From the user point of view, the application tier is
a conceptualized form of the original database. Users are unaware of any tiers beyond
this layer. Similarly from the database point of view, the application layer acts as the
33. SQL useful functions
SQL has many built-in functions for performing processing on string or numeric
data.
SQL MIN/MAX Function - The SQL MIN/MAX aggregate functions allows us to
select the lowest(minimum) or highest (maximum) value for a certain column.
SELECT MIN(column_name)
FROM table_name
WHERE condition;
SELECT MAX(column_name)
FROM table_name
WHERE condition;
34. SQL COUNT Function - The SQL COUNT aggregate function is used to count the
number of rows in a database table.
SELECT COUNT(column_name)
FROM table_name
WHERE condition;
SQL AVG Function - The SQL AVG aggregate function selects the average value
for certain table column.
SELECT AVG(column_name)
FROM table_name
WHERE condition;
35. SQL SUM Function - The SQL SUM aggregate function allows selecting the total
for a numeric column.
SELECT SUM(column_name)
FROM table_name
WHERE condition;
36. ORDER BY
The SQL ORDER BY clause is used to sort the data in ascending or descending
order, based on one or more columns. Some databases sort the query results in
an ascending order by default.
SELECT column-list FROM table_name
[WHERE condition] [ORDER BY column1, column2, .. columnN] [ASC | DESC];
SQL> SELECT * FROM CUSTOMERS ORDER BY NAME, SALARY;
SQL> SELECT * FROM CUSTOMERS ORDER BY NAME DESC;
37. GROUP BY
The SQL GROUP BY clause is used in collaboration with the SELECT statement to
arrange identical data into groups. This GROUP BY clause follows the WHERE
clause in a SELECT statement and precedes the ORDER BY clause.
SELECT column_name(s)
FROM table_name
WHERE condition
GROUP BY column_name(s)
ORDER BY column_name(s);
SELECT COUNT(CustomerID), Country
FROM Customers
GROUP BY Country;
SELECT COUNT(CustomerID), Country
FROM Customers
GROUP BY Country
ORDER BY COUNT(CustomerID) DESC;
38. SQL CONSTRAINTS
Constraints are the rules enforced on the data columns of a table. These are used to limit
the type of data that can go into a table. This ensures the accuracy and reliability of the
data in the database.
Constraints could be either on a column level or a table level. The column level constraints
are applied only to one column, whereas the table level constraints are applied to the whole
table.
Following are some of the most commonly used constraints available in SQL. These
constraints have already been discussed in SQL - RDBMS Concepts chapter, but it’s worth to
revise them at this point.
• NOT NULL Constraint − Ensures that a column cannot have NULL value.
• DEFAULT Constraint − Provides a default value for a column when none is specified.
• UNIQUE Constraint − Ensures that all values in a column are different.
• PRIMARY Key − Uniquely identifies each row/record in a database table.
• FOREIGN Key − Uniquely identifies a row/record in any of the given database table.
• CHECK Constraint − The CHECK constraint ensures that all the values in a column satisfies
certain conditions.
• INDEX − Used to create and retrieve data from the database very quickly.
39. SQL JOINS
The SQL Joins clause is used to combine records from two or more tables in a database. A
JOIN is a means for combining fields from two tables by using values common to each.
SELECT Orders.OrderID, Customers.CustomerName, Orders.OrderDate
FROM Orders
INNER JOIN Customers ON Orders.CustomerID=Customers.CustomerID;
There are different types of joins available in SQL −
• INNER JOIN − returns rows when there is a match in both tables.
• LEFT JOIN − returns all rows from the left table, even if there are no matches in the right
table.
• RIGHT JOIN − returns all rows from the right table, even if there are no matches in the left
table.
• FULL JOIN − returns rows when there is a match in one of the tables.