Part2, Continue from Part1
Let’s start with Database testing by understanding SQL (Structural Query Language, Pronounced as -sequel).
Before we start, we need 2 things
1. Database connection strings (i.e. IP of Database server , userid and Password ) to connect to database and
2. Database client tool (like Toad, SQL Developer, SQl Server client or any tool that you use...)
Now understand what happens when we execute SQL statements:
Internally 2 things happen:
1. Your executed SQL statement is going to Compile
It will check for any semantic errors on the client side .In toad tool it will check for an error like invalid table name , invalid column name , sql keywords is wrongly used etc .If any error occurs then a pop up message to correct the statement will appear. In contrary to stored procedure (SP) where sql statements are already pre- complied. That is one of the differences between SQL statements and stored procedure and hence SP provide good performance as well as security benefits -SQL injection
2. Your Complied SQL statement is going to execute on Database server
When we execute the command it sends request to execute the statement on Database server. If connection is meeting then SQL statement is executed and result appears on client tool
That was the basic what happens behind the wall when we execute the SQL Query.
As a test engineer our intention is to validate the data, for that we use the select statement. We hardly use other DML (Data Manipulation Language – Insert, delete and Update), mostly we have only read access of database and no read write access, so we cannot use other manipulation like, insert, update or delete.
No comments:
Post a Comment