Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
63 views
SQL Queries
sql queries
Uploaded by
ashokkumar g
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save sql queries For Later
Download
Save
Save sql queries For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
63 views
SQL Queries
sql queries
Uploaded by
ashokkumar g
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save sql queries For Later
Carousel Previous
Carousel Next
Save
Save sql queries For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 16
Search
Fullscreen
Guru99 Database (Data) Testing Tutorial with Sample Test Cases © ey torastamiton © Updated Febuary 12,2022 What is Database Testing? Database Testingis 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 loadi/stress test the Database and check its responsiveness, Why Database Testing is Important? Database Testingis Important in software testing because it ensures data values and information received and stored into database are valid or not, Database testing helps to save data loss, saves aborted transaction data and no unauthorized access to the information. Database is important for any software application hence testers must have good knowledge of SQL for database testing, ‘The GUI is usually given the most emphasis by the test and development team members since the Graphical User Interface happens to be the most Visible part ofthe application, However, whats also important isto validate the information thatis the heart of the application, ake DATABASE, Let us consider a Banking application wherein a user makes transactions, Now from Database Testing or DB Testing viewpoint following, things are important 1, The application stores the transaction information in the application database and displays them correctly to the user. 2, No information is lastin the process, 3. No partially performed or aborted operation information is saved by the application. * 4, No unauthorized individual is allowed to access the user's information,‘To ensure all these above objectives, we need to use data validation or data testing In this Database Testing tutorial, we will learn about different Database Testing concepts like: * Differences between User-Interface Testing and Data Testing, + Types of Database Testing, © What is Schema Testing * Database Table, Column Testing. + Stored Procedures Testing © Trigger Testing Database Server Validations + Functional Database Testing © Login and User Security * Load Testing + Database Stress Testing ‘© Myths or Misconceptions related to Database Testing Best Practices Differences between User-Interface Testing and Data TestingUserinterface testing ‘This type of testing is also known as Graphical User Interface testing or Front-end Testing, This type of testing chiefly deals with all the testable items that are open to ‘the user for viewership and interaction like Forms, Presentation, Graphs, Menus, and Reports, etc (created through VB, VB.net, VC+4, Delphi~ Front- ‘end Too!s) ‘This type of testing includes validating the * text bores, + select dropdowns ‘= calendars and buttons + Page navigation + display of images + Look and feel ofthe overall application Database or Data testing This type of testing s also known as Backend Testing or data testing, This type of testing chiefly deals with all the testable tems that are generally hidden from the user for viewership. These include internal processes and storage like Assembly, DAMS like Oracle, SQL Server, MYSQL, ete This type of testing involves validating: + theschema ‘+ database tables = columns ‘+ keys and indexes ‘+ stored procedures triggers + database server validations * + validating data duplicationUserinterface testing Database or Data testing ‘The tester must be thoroughly knowledgeable about the business Tobe able to perform backend testing, must the tester have a strong requirements 2s well as the usage ofthe development tools and the usage background in the database server and Structured Query Language of automation frameworks and tools concepts, Types of Database TestingNon- Functional Testing Structural Functional Testing Testing Types of Database Testing ‘The 3 types of Database Testing are 4. Structural Testing 2, Functional Testing 3, Non-functional Testing In this Database Testing tutorial, we will look into each type and its sub-types one by one. ‘Structural Database Testing ‘Structural Database Testing's 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 ofthis testing needs mastery in SQL queries. * What is Schema Testing?‘Schema Testing in database testing validates various schema formats associated with the database and verifies whether the mapping formats of tables/views/columns are compatible with mapping formats of user interface. The main purpose of schema testingis to ensure the schema mapping between front-end and back-end are similar. Thus, itis also referred to as mappingtesting. Let us discuss the most important checkpoints for schema testing. 1. Validation of the various schema formats associated with the databases, Many times the mapping format of the table may not be compatible wit ‘mapping format present in the user interface level ofthe application. 2. There isa need for verification in the case of unmapped tables/views/columns. 3. Theres also a need to verify whether heterogeneous databases in an environment are consistent with the overall application mapping. Let us also look at some ofthe interesting Database Testing tools for validating database schemas, + DBUnit that is integrated with Ant is very suitable for mapping testing, + SQL Server allows the testers tobe able to check and to query the schema of the Database by writing simple queries and not through code. For example, ifthe developers want to change a table structure or delete it, the tester would want to ensure that all the Stored Procedures and Views that use that table are compatible with the particular change. Another example could be that i the testers want to check for schema changes between 2 databases, they can do that by using simple queries. Database Table, Column Testing Let us look into various checks for database and column testing. 4, Whether the mapping of the database fields and columns in the backend is compatible with those mappings inthe front-end? 2, Validation ofthe length and naming convention of the database fields and columns as specified by the requirements, 3. Validation of the presence of any unused unmapped database tables/columns. 4.Nalidation ofthe compatibility of the + datatype * field lengthsofthe backend database columns with that of those present a the frontend ofthe application, '5. Whether the database fields allow the user to provide desired user inputs as required by the business requirement specification documents Keys and indexes testing Important checks for keys and indexes ~ 4. Check whether the required + Primary Key + Foreign Key constraints have been created on the required tables. 2, Check whether the references for foreign keys are valid. 3. Check whether the data type ofthe primary key and the corresponding foreign keys are the same in the two tables. 4. Check whether the required naming conventions have been followed forall the keys and indexes. '5, Check the size and length of the required fields and indexes. 6, Whether the required + Clustered indexes ‘Non Clustered indexes have been created on the required tables as specified by the business requirements. Stored Procedures Testing Important tests to check stored procedures are: 1 Whether the development team did adopt the required+ coding standard conventions + exception and error handling forall the stored procedures forall the modules forthe application under test 2, Whether the development team did cover all the conditions/loops by applying the required input data to the application under test? 3. Whether the development team did properly apply the TRIM operation whenever data is fetched from the required tables inthe Database? 4, Whether the manual execution ofthe Stored Procedure provides the end-user with the required result? 5, Whether the manual execution of the Stored Procedure ensures the table fields are being updated as required by the application under test? 6, Whether the execution of the Stored Procedures enables the implicit invoking ofthe required triggers? 7. Validation of the presence of any unused stored procedures, 8, Validation for Allow Null condition which can be done at the database level. 9. Validation of the fact that ll the Stored Procedures and Functions have been successfully executed when the Database under testis blank. 10, Validation of the overall integration ofthe stored procedure modules as per as the requirements of the application under test. Some of the useful Database Testing tools for testing stored procedures are LINQ, SP Test tool et. Trigger Testing 1, Whether the required coding conventions have been followed during the coding phase ofthe Triggers? 2. Check whether the triggers executed for the respective DML transactions have fulfiled the required conditions '3, Whether the trigger updates the data correctly once they have been executed? 4 Nalidation of the required Update/Insert/Delete triggers functionality in the realm of the application under tes. Database Server Validations— 4. Check the database server configurations as specified by the business requirements. 2. Check the authorization of the required user to perform only those levels of actions that are required by the application 43 Check that the database servers able to cater tothe needs of the maximum allowed number of user-transactions as specified by the business requirement specifications. Functional Database Testing Functional Database Testing is type of database testing thats used to validate the functional requirements ofa database from the end-user's perspective. Tne main goal of functional database testing sto test whether the transactions and operations performed by the end-users which are related tothe database works as expected or not. Following are the basic conditions that need to be observed for database validations. + Whether the field is mandatory while allowing NULL values on that field? + Whether the length of each field is of sufficient size? + Whether all similar fields have the same names across tables? + Whether there are any computed fields present in the Database? This particular process is the validation of the field mappings from the end-user viewpoint. In this particular scenario, the tester would perforr ‘operation atthe database level and then would navigate to the relevant user interface iter to observe and validate whether the proper fieldvalidations have been carried out or not. The vice versa condition whereby, first operation is carried out by the tester atthe user interface, and then the same is validated from the back end is should also be done. Checking data integrity and consistency Following checks are important 41. Whether the data s logically well organized? 2, Whether the data stored in the tables is correct and as per the business requirements? 43, Whether there are any unnecessary data present in the application under test? 4, Whether the data has been stored as per as the requirement with respect to data which has been updated from the user interface? '5, Whether the TRIM operations performed on the data before inserting data into the Database under test? 6, Whether the transactions have been performed according to the business requirement specifications and whether the results are correct or not? 7. Whether the data has been properly committed ifthe transaction has been successfully executed? 8, Whether the data has been rolled backed successfully ifthe transaction has not been executed successfully by the end-user? 9, Whether the data has been rolled backed ifthe transaction has not been executed successfully and multiple heterogeneous databases have been involved in the transaction in question? 10, Whether al the transactions have been executed by using the required design procedures as specified by the system business requirements? Login and User Security ‘The validations ofthe login and user security credentials need to take into consideration the following things. 1. Whether the application prevents the user from proceeding furtherin the application incase of a + invalid username but valid password + valid username but invalid password. + invalid username and invalid password. 2. Whether the useris allowed to perform only those specific operations which are specified by the business requirements? 43. Whether the data is secured from unauthorized access?4, Whether there are different user roles created with different permissions? 5, Whether all the users have required levels of access on the specified Database as required by the business specifications? 6. Check that sensitive data lke passwords, creditcard numbers are encrypted and not stored as plaintext in Database. It's a good practice to ensure all accounts should have passwords that are complex and not easily guessed. Non-functional testing Non-functional testingin the context of database testing can be categorized into various categories as required by the business requirements. These can be load testing, Stress Testing, Security Testing, Usability Testing, and Compatibility Testing, and so on. The load testing, as well a stress testing, which can be grouped under the gamut of Performance Testing serves two specific purposes when it comes to the role of nonfunctional testing, Risk quantification- Quantification of risk helps the stakeholders to ascertain the various system response time requirements under required levels Cf load. This isthe original intent of any quality assurance task. We need to note that oad testing does not mitigate risk directly, but through the processes of risk identification and risk quantification, presents corrective opportunities and an impetus for remediation that will mitigate rs. ‘Minimum system equipment requirement- The minimum system configuration that wil allow the system to meet the formally stated performance expectations of stakeholders So that extraneous hardware, software, and the associated cost of ownership can be minimized. This particular requirement can be categorized as the overall Business optimization requirement. Load Testing The purpose of any load test should be clearly understood and documented. The following types of configurations are a must for load testing, 1, The most frequently used user transactions have the potential to impact the performance of all ofthe other transactions if they are not efficient. 2. Atleast one non-editing user transaction should be included inthe final test suite, so that performance of such transactions can be differentiated from other more complex transa 3, The more important transactions that facilitate the core objectives ofthe system should be included, as failure under a load of these transactions has, by definition, the greatest impact. 4, At least one editable transaction should be included so that performance of such transactions can be differentiated from other transactions, '5, Optimum response time under huge number of virtual users for all the prospective requirements. p 5p es Pt 4 * 6. Effective times for fetching of various records.Important load testing tools are load runner, win tunner and JMeter. What is Database Stress Testing? Database Stress Testing's a testing method used to stress test database system with heavy load such that it fils at some point. Tis helps in identiying the breakdown point of database system. Itrequires proper planning an efforts in order to avoid over usage of resources. Data stress testingisalso known as torturous testing or fatigue testing. Important tress testing tools are LoadRunner and JMeter. Most common occurring issues during database testing + Solution: The overall process planning and timing should be organized so that no time and cost based issues appear. + Solution: A prior plan and methodology for test data generation should be at hand * Solution: Maintenance ofthe SQL queries and their continuous updating sa significant part of the overall testing process which should be part of the overall test strategy. min *+ Solution: There should be a fine balance between quality and overall project schedule duration, “eS. ~~ MM Myths or Misconceptions related to Database Testing Database eating requires plenty of expertise and st Reality: Effective and efficient Database Testing in Software Testing provides long-term functional stability to the overall application thus tis. necessary to put in hard work behind it. Database teeting adie extra work bottleneck Reality: On the contrary, database testing adds more value to the overall work by finding out hidden issues and thus pro-actively helping to improve the overall application. * Database testing slows down the overall development processReality: Significant amount of database testing helps inthe overall improvement of quality for the database application. Reality: Any expenditure on database testing i a long-term investment which leads to long-term stability and robustness of the application. Thus expenditure on Database Testing or SQL Testingis necessary. Best Practices ‘+ Alldata including the metadata as well as the functional data needs to be validated according to thelr mapping by the requirement specification documents, + Verification ofthe test data which has been created by /in consultation with the development team needs to be validated, + Validation of the output data by using both manual as well as automation procedures. + Deployment of various techniques such as the cause effect graphing technique, equivalence partitioning technique and boundary-value analysis technique for generation of required test data conditions. ‘The validation rules of referential integrity forthe required database tables also need to be validated, + The selection of default table values for validation on database consistency isa very important concept Whether the log events have been successfully added in the Database forall required login events + Does scheduled jabs execute in timely manner? + Take timely backup of Database. Checkout - Database Testing Interview Questions & Answers You Might Like: + ETL Testing or Data Warehouse Testing Tutorial: Whats ETL?Reporta Bug Write For Us Contact Us About Us ‘Advertise with Us SAP Career Suggestion Tool Software Testing as a Career eBook Blog Quiz SAP eBook Execute Java Online Execute Javascript Execute HTML, Execute PythonSelenium Informatica JIRA ©Copyright-Guru99 2022 Privacy Policy | Affilate Disclaimer | ToS
You might also like
Hourglass Workout Program by Luisagiuliet 2
PDF
76% (21)
Hourglass Workout Program by Luisagiuliet 2
51 pages
12 Week Program: Summer Body Starts Now
PDF
87% (46)
12 Week Program: Summer Body Starts Now
70 pages
Read People Like A Book by Patrick King-Edited
PDF
58% (81)
Read People Like A Book by Patrick King-Edited
12 pages
Livingood, Blake - Livingood Daily Your 21-Day Guide To Experience Real Health
PDF
77% (13)
Livingood, Blake - Livingood Daily Your 21-Day Guide To Experience Real Health
260 pages
Cheat Code To The Universe
PDF
94% (79)
Cheat Code To The Universe
34 pages
Facial Gains Guide (001 081)
PDF
91% (45)
Facial Gains Guide (001 081)
81 pages
Curse of Strahd
PDF
95% (467)
Curse of Strahd
258 pages
The Psychiatric Interview - Daniel Carlat
PDF
91% (34)
The Psychiatric Interview - Daniel Carlat
473 pages
Can't Hurt Me
PDF
69% (29)
Can't Hurt Me
10 pages
The Borax Conspiracy
PDF
91% (57)
The Borax Conspiracy
14 pages
Trauma-Focused ACT - Russ Harris
PDF
95% (39)
Trauma-Focused ACT - Russ Harris
568 pages
Anastasia: The New Broadway Musical (LIBRETTO)
PDF
94% (175)
Anastasia: The New Broadway Musical (LIBRETTO)
117 pages
COSMIC CONSCIOUSNESS OF HUMANITY - PROBLEMS OF NEW COSMOGONY (V.P.Kaznacheev,. Л. V. Trofimov.)
PDF
94% (214)
COSMIC CONSCIOUSNESS OF HUMANITY - PROBLEMS OF NEW COSMOGONY (V.P.Kaznacheev,. Л. V. Trofimov.)
212 pages
I Hate You - Don't Leave Me
PDF
80% (54)
I Hate You - Don't Leave Me
6 pages
TDA Birth Certificate Bond Instructions
PDF
97% (284)
TDA Birth Certificate Bond Instructions
4 pages
The Secret Language of Attraction
PDF
86% (107)
The Secret Language of Attraction
278 pages
How To Develop and Write A Grant Proposal
PDF
83% (542)
How To Develop and Write A Grant Proposal
17 pages
Penis Enlargement Secret
PDF
60% (124)
Penis Enlargement Secret
12 pages
Workbook For The Body Keeps The Score
PDF
89% (53)
Workbook For The Body Keeps The Score
111 pages
Donald Trump & Jeffrey Epstein Rape Lawsuit and Affidavits
PDF
83% (1016)
Donald Trump & Jeffrey Epstein Rape Lawsuit and Affidavits
13 pages
KamaSutra Positions
PDF
78% (69)
KamaSutra Positions
55 pages
7 Hermetic Principles
PDF
93% (30)
7 Hermetic Principles
3 pages
27 Feedback Mechanisms Pogil Key
PDF
77% (13)
27 Feedback Mechanisms Pogil Key
6 pages
Frank Hammond - List of Demons
PDF
92% (92)
Frank Hammond - List of Demons
3 pages
Phone Codes
PDF
79% (28)
Phone Codes
5 pages
36 Questions That Lead To Love
PDF
91% (35)
36 Questions That Lead To Love
3 pages
How 2 Setup Trust
PDF
97% (307)
How 2 Setup Trust
3 pages
2025 MandateForLeadership FULL
PDF
70% (10)
2025 MandateForLeadership FULL
920 pages
How To Kiss A Woman's Breast
PDF
60% (114)
How To Kiss A Woman's Breast
14 pages
100 Questions To Ask Your Partner
PDF
80% (35)
100 Questions To Ask Your Partner
2 pages
The 36 Questions That Lead To Love - The New York Times
PDF
94% (34)
The 36 Questions That Lead To Love - The New York Times
3 pages
Satanic Calendar
PDF
25% (56)
Satanic Calendar
4 pages
The 36 Questions That Lead To Love - The New York Times
PDF
95% (21)
The 36 Questions That Lead To Love - The New York Times
3 pages
14 Easiest & Hardest Muscles To Build (Ranked With Solutions)
PDF
100% (8)
14 Easiest & Hardest Muscles To Build (Ranked With Solutions)
27 pages
Jeffrey Epstein39s Little Black Book Unredacted PDF
PDF
75% (12)
Jeffrey Epstein39s Little Black Book Unredacted PDF
95 pages
ALCHEMIST
PDF
64% (14)
ALCHEMIST
4 pages
1001 Songs
PDF
69% (72)
1001 Songs
1,798 pages
Twenty-Five SQL Practice Exercises: These Questions and Example Solutions Will Keep Your Skills Sharp
PDF
No ratings yet
Twenty-Five SQL Practice Exercises: These Questions and Example Solutions Will Keep Your Skills Sharp
39 pages
The 4 Hour Workweek, Expanded and Updated by Timothy Ferriss - Excerpt
PDF
23% (954)
The 4 Hour Workweek, Expanded and Updated by Timothy Ferriss - Excerpt
38 pages
Zodiac Sign & Their Most Common Addictions
PDF
63% (30)
Zodiac Sign & Their Most Common Addictions
9 pages
Extra Transform Load Etl
PDF
No ratings yet
Extra Transform Load Etl
16 pages
Database Testing
PDF
No ratings yet
Database Testing
48 pages
Database+testing+1 1
PDF
No ratings yet
Database+testing+1 1
21 pages
Database Testing Overiew - 2
PDF
No ratings yet
Database Testing Overiew - 2
11 pages
Data Validity Testing
PDF
No ratings yet
Data Validity Testing
9 pages
DB Iq
PDF
No ratings yet
DB Iq
27 pages
Database Testing: Prepared by Sujaritha M
PDF
No ratings yet
Database Testing: Prepared by Sujaritha M
21 pages
Database Testing Guide
PDF
No ratings yet
Database Testing Guide
6 pages
Database Testing Tutorial
PDF
100% (1)
Database Testing Tutorial
43 pages
A Complete Guide to Database Testing with Practical Tips and Examples
PDF
No ratings yet
A Complete Guide to Database Testing with Practical Tips and Examples
10 pages
What Is Database Testing? An1
PDF
No ratings yet
What Is Database Testing? An1
6 pages
What To Test in Database Testing: 1) Ensure Data Mapping
PDF
No ratings yet
What To Test in Database Testing: 1) Ensure Data Mapping
3 pages
Database Testing Interview Questions
PDF
67% (3)
Database Testing Interview Questions
4 pages
Performing Database System Test UC - 8
PDF
No ratings yet
Performing Database System Test UC - 8
10 pages
Database Testing Question & Answers: What Is Way of Writing Testcases For Database Testing?
PDF
No ratings yet
Database Testing Question & Answers: What Is Way of Writing Testcases For Database Testing?
3 pages
Database Testing PDF
PDF
No ratings yet
Database Testing PDF
4 pages
Tutorial Database Testing Using SQL
PDF
No ratings yet
Tutorial Database Testing Using SQL
0 pages
DB Testing Basics
PDF
No ratings yet
DB Testing Basics
22 pages
What Are The Key Aspects of Database Testing?
PDF
No ratings yet
What Are The Key Aspects of Database Testing?
9 pages
Database Testing
PDF
No ratings yet
Database Testing
34 pages
Database Testing: Gourav Mehta (Associate QA Engineer)
PDF
No ratings yet
Database Testing: Gourav Mehta (Associate QA Engineer)
12 pages
What We Normally Check For in The Database Testing
PDF
No ratings yet
What We Normally Check For in The Database Testing
20 pages
DB Testin Interwiew Ques
PDF
No ratings yet
DB Testin Interwiew Ques
2 pages
Chapter 3 Database Testing
PDF
No ratings yet
Chapter 3 Database Testing
13 pages
1) Connect To The Database
PDF
No ratings yet
1) Connect To The Database
6 pages
Tips For Database Testing: Questions Related To Database Structure
PDF
No ratings yet
Tips For Database Testing: Questions Related To Database Structure
4 pages
Database Testing
PDF
No ratings yet
Database Testing
4 pages
Etl Imp
PDF
No ratings yet
Etl Imp
138 pages
Database Testing
PDF
No ratings yet
Database Testing
45 pages
Database-Testing-Interview-Questions-and-Answers-288
PDF
No ratings yet
Database-Testing-Interview-Questions-and-Answers-288
8 pages
DB Testing Concepts SWT
PDF
No ratings yet
DB Testing Concepts SWT
3 pages
Basics of Database Testing Contains The Following
PDF
No ratings yet
Basics of Database Testing Contains The Following
4 pages
Database Interview Questions Answers
PDF
No ratings yet
Database Interview Questions Answers
22 pages
Basics of Database Testing Contains The Following
PDF
No ratings yet
Basics of Database Testing Contains The Following
4 pages
DBTesting
PDF
No ratings yet
DBTesting
2 pages
Mind Q Systems Private Limited
PDF
No ratings yet
Mind Q Systems Private Limited
1 page
DATABASE TESTING NOTES
PDF
No ratings yet
DATABASE TESTING NOTES
3 pages
Perform Database System Test1
PDF
No ratings yet
Perform Database System Test1
54 pages
Database testing project
PDF
No ratings yet
Database testing project
19 pages
Data Base Test
PDF
No ratings yet
Data Base Test
12 pages
Database Testing Approach - V1.0
PDF
No ratings yet
Database Testing Approach - V1.0
16 pages
Data Base Administration Level IV: Shashemene Poly Technique College
PDF
No ratings yet
Data Base Administration Level IV: Shashemene Poly Technique College
33 pages
Database Testing Interview Questions
PDF
No ratings yet
Database Testing Interview Questions
7 pages
Performing Database System Test
PDF
No ratings yet
Performing Database System Test
32 pages
Database Testing
PDF
No ratings yet
Database Testing
6 pages
Order by Clause PDF
PDF
No ratings yet
Order by Clause PDF
9 pages
SQL Queries
PDF
No ratings yet
SQL Queries
25 pages
140+ SQL Interview Questions and Answers (2022) - Great Learning
PDF
No ratings yet
140+ SQL Interview Questions and Answers (2022) - Great Learning
60 pages
Trade Life Cycle Management in Finpricing: Part 3
PDF
No ratings yet
Trade Life Cycle Management in Finpricing: Part 3
16 pages
Trade Life Cycle Management in Finpricing: Part 1
PDF
No ratings yet
Trade Life Cycle Management in Finpricing: Part 1
15 pages