Part2 : Database Testing | Environment Setup
Summary
TLDRThis tutorial video script guides viewers through setting up an environment for database testing. It begins with installing MySQL Server and downloading the 'classic models' sample database, followed by importing the schema and data into the local server. The script also covers exploring the database schema, which includes tables like customers, orders, and products, and mentions future lessons on testing database objects like tables, views, and relationships.
Takeaways
- š The video is a tutorial on setting up an environment for database testing, following an introduction to database testing in a previous video.
- š¾ The first step in setting up the environment is to install a database server; the video uses MySQL as an example, but other databases like Oracle or MSSQL Server are also options.
- š The video provides a link for downloading the MySQL server installer, which is essential for the setup process.
- š„ļø Viewers are guided to watch another video for step-by-step instructions on installing MySQL on a Windows operating system, covering basic database operations and connections.
- šļø After installing MySQL, the next step is to create a database schema, which is necessary for database testing.
- š The 'Classic Models' sample database schema is recommended for practicing database testing, which can be downloaded from the MySQL website.
- š The 'Classic Models' schema comes with an SQL file that needs to be imported to create the database structure and populate it with data.
- š ļø MySQL Workbench is introduced as the client software for the MySQL database server, used for connecting to the local server and managing databases.
- š The process of creating a new database and importing the 'Classic Models' schema data into it using MySQL Workbench is demonstrated.
- š The 'Classic Models' database consists of eight tables, each serving a different purpose and interconnected through primary and foreign keys.
- š¬ The video concludes with an overview of the tables in the 'Classic Models' schema and a preview of upcoming videos that will cover testing different database objects.
Q & A
What is the main topic of the video?
-The main topic of the video is setting up an environment for database testing, specifically using MySQL as the database server.
Why is environment setup necessary before database testing?
-Environment setup is necessary to install the database server, create the required schemas, and populate them with data, which provides the foundation for performing database testing.
Which database server is used in the video for demonstration?
-MySQL is used in the video for demonstrating the setup process for database testing.
What is the link provided in the video for downloading MySQL?
-The video provides a link in the description for downloading the MySQL installer from the MySQL Community Downloads page.
What are the two different flavors of MySQL mentioned in the video?
-The two different flavors mentioned are for the web community and the installer community, with the latter being for standalone software installation on a local machine.
How can viewers learn to install MySQL on Windows?
-Viewers can learn to install MySQL on Windows by following a provided video link that explains the step-by-step process, including using SQL Workbench and command line clients.
What is the sample database schema used for database testing in the video?
-The sample database schema used is called 'Classic Models,' which is a popular sample database provided by MySQL.
What does the 'Classic Models' database schema contain?
-The 'Classic Models' database schema contains several tables such as customers, employees, offices, order details, orders, payments, product lines, and products, which are interconnected through primary and foreign keys.
How can one import the 'Classic Models' database schema into MySQL?
-One can import the 'Classic Models' database schema into MySQL by downloading the .sql file, then using the Data Import feature in MySQL Workbench to import the data into the 'classic models' schema.
What command is used to create a new database in MySQL?
-The command used to create a new database in MySQL is 'CREATE DATABASE database_name;', where 'database_name' is the name of the new database, such as 'classic models'.
What command is used to switch to a specific database in MySQL?
-The command used to switch to a specific database in MySQL is 'USE database_name;', which connects to the specified database for further operations.
What command in MySQL shows all the tables in a database?
-The command 'SHOW TABLES;' in MySQL is used to display all the tables available in the currently selected database.
What will be covered in the next video according to the script?
-The next video will cover how to test different database objects such as tables, views, and the relationships between tables, as discussed in a previous video.
Outlines
š ļø Setting Up the Database Testing Environment
The script begins with an introduction to the video's purpose, which is to demonstrate the setup of an environment for database testing. The speaker explains the prerequisites, starting with the installation of a database server, such as MySQL, Oracle, or MSSQL. The focus is on MySQL, and the audience is guided to download it from the official website. The speaker also provides a link to a video tutorial on installing MySQL on Windows. After the installation, the script discusses the necessity of having a database schema for testing, specifically the 'classic models' schema, and provides a link to download it. The process of importing the schema into the newly installed MySQL server is outlined, including using MySQL Workbench to connect to the local server, create a new database, and import the data from the downloaded SQL file.
š Exploring the Classic Models Database Schema
This paragraph delves into the exploration of the 'classic models' database schema after its successful import. The script describes how to use MySQL Workbench to create a new database, import data, and verify the presence of tables, views, stored procedures, and functions within the database. The focus is on the 'classic models' database, which contains several tables such as customers, orders, payments, and others, each serving a specific purpose and interconnected through primary and foreign keys. The speaker also mentions the availability of documentation for the schema and the importance of understanding each table's role in the database for effective testing.
šļø Preparing for Practical Database Testing
The final paragraph of the script wraps up the environment setup and previews the next steps. Having successfully installed MySQL and imported the 'classic models' database, the speaker outlines the next video's content, which will cover practical database testing of various objects such as tables, views, and the relationships between them. The script emphasizes the importance of this setup as a foundation for the upcoming testing procedures and assures the audience that the subsequent video will provide hands-on demonstrations of the testing techniques discussed previously.
Mindmap
Keywords
š”Database Testing
š”User Interface Testing
š”Database Server
š”Schemas
š”MySQL
š”MySQL Workbench
š”Sample Database
š”SQL File
š”Data Import
š”Tables
š”Primary Key and Foreign Key
Highlights
Introduction to database testing, its purpose, and its distinction from user interface testing.
Discussion on various types of database testing methods.
Demonstration of setting up an environment for database testing.
Installation of MySQL as a prerequisite for database testing.
Providing a link for downloading MySQL Community Server.
Instructions on selecting the appropriate MySQL installer for local machine setup.
Explanation of downloading and installing MySQL Workbench for database management.
Guidance on how to connect to a local MySQL server using Workbench.
Importance of having a database schema for effective database testing.
Downloading the 'classic models' sample database schema for testing purposes.
Process of importing the 'classic models' SQL file into the MySQL server.
Using MySQL Workbench to create a new database and import sample data.
Exploration of the 'classic models' database schema and its tables.
Description of the different tables within the 'classic models' schema, such as customers, orders, and products.
Explanation of how to execute SQL queries to view data within the database tables.
Teaser for the next video, which will cover practical testing of database objects like tables and views.
Conclusion of the video with a summary of the steps taken to set up the database testing environment.
Transcripts
hi everyone welcome you all inĀ our previous video we have seen uhĀ Ā
introduction about database testing and asĀ part of that we have discussed about what isĀ Ā
database testing and what is the differenceĀ between user interface and database testingĀ Ā
and also we have discussed about different typesĀ of database testing now in the today's video i'mĀ Ā
going to show you how we can set up environmentĀ to perform database testing so before performingĀ Ā
database testing we need to set up the environmentĀ so first we need to install database serverĀ Ā
and which we need to have the database alongĀ with the required schemas and then we willĀ Ā
explore those schemas and then we will startĀ the database testing so now we'll start withĀ Ā
environment setup so first of all what we needĀ to do is we need to first download and installĀ Ā
mysql so you can use any database server youĀ can use it oracle or mssql server or any otherĀ Ā
databases but i am using here is my sequel okayĀ so download and install my sequel so these areĀ Ā
first prior first prerequisite so for that whatĀ you need to do is we need to go to this linkĀ Ā
and i will provide this link in the descriptionĀ you can get it from there so go to directlyĀ Ā
this link and they provided uh installer of mysqlĀ server so you can just download and install so youĀ Ā
can just look at here mysql community downloads inĀ this link you can get it here so my sql installerĀ Ā
for windows you can just click on this link andĀ again it will go to the next page and here you canĀ Ā
it will show you two different flavors andĀ one is for web community the other is forĀ Ā
uh installer community so installer only forĀ community so you can just select the secondĀ Ā
option if you want to install mysql server onĀ your local machine as a standalone softwareĀ Ā
and once you click on this download it will tryĀ to download your my sequel server installer inĀ Ā
the dot msi file so once you get that file youĀ can start installing the my sql server so forĀ Ā
that i'm just going to share this video okayĀ so here i'm just giving the link how to installĀ Ā
uh how to install a ms sql server or how toĀ install my sql on your windows operating systemĀ Ā
so you can just go to the video how to install myĀ sequel on windows so you can just go to the videoĀ Ā
and you will be able to understand how we canĀ install my sequel on windows cycle expense stepĀ Ā
by step and along with the installation i also uhĀ explained about to database lines like how to useĀ Ā
sql workbench and how to use command line clientsĀ how to connect to the database so the basic stuffĀ Ā
i have already explained in this video so pleaseĀ go to the video so before proceeding furtherĀ Ā
okay this is as a prerequisite so once weĀ install mysql on windows so the second thing isĀ Ā
we need to have a database schema so for databaseĀ testing we need to have one database schemaĀ Ā
so for that i'm using a sample database schemaĀ i'm going to download which is basically classicĀ Ā
uh models okay so the first part is we haveĀ successfully downloaded and install mysql serverĀ Ā
and the second step is we need to have sampleĀ database download ms sql sample database theĀ Ā
database name is classic models so how to downloadĀ this classic model so you can just go to thisĀ Ā
website and here you can just search for downloadĀ classic models database okay and you can get itĀ Ā
directly from there my sequel website itselfĀ we can just look at here mysql sample databaseĀ Ā
and this is more popular database so by defaultĀ you will get it through mysql and but you willĀ Ā
get only the schema but you don't have any tablesĀ or anything so we need to download the data andĀ Ā
we need to populate in our database so if i justĀ go to this link and they will provide you how toĀ Ā
download mysql sample database you can just clickĀ on this link download mysql sample database and asĀ Ā
soon as you click on this link which will downloadĀ it a small zip file and go to this zip file andĀ Ā
once extracted you will see small sql file hereĀ mysql sample database dot sql file you can seeĀ Ā
and this particular file we have to import andĀ from this particular file we have to load theĀ Ā
data into our database so for that what we need toĀ do is we need to first go to mysql so whichever weĀ Ā
have installed in the first step we need to firstĀ go and open the workbench so as soon as we haveĀ Ā
installed mysql or database server by default youĀ will get the workbench mssql workbench this is aĀ Ā
client software of mysql database server and nowĀ open this and as soon as you open this client andĀ Ā
you will able to connect to the local server soĀ currently my sql is installed on my local machineĀ Ā
so you can just go to the database and connectĀ to the database and here you need to provide theĀ Ā
connection details like i provided somethingĀ like localhostname and 3306 is a default portĀ Ā
number of mysql and i'm giving root username andĀ if password is required and you can specify theĀ Ā
password also and once you provide the connectionĀ details of your database here you can just say okĀ Ā
and it will automatically connect it to the yourĀ local database and if i just look at here thereĀ Ā
are some default databases you can see alreadyĀ here and these databases by default comes alongĀ Ā
with the mysql server which is uh by default it isĀ provided okay so now what we need to do we need toĀ Ā
create our own database and then we need to importĀ the data into the database for our testing so weĀ Ā
already downloaded this mysql sample databaseĀ so now we need to have this in our mysql serverĀ Ā
so for that we need to first open the sql editorĀ and here we can execute all the sql statementsĀ Ā
in mysql client or mysql workbench client soĀ how to create a database i'm just creating theĀ Ā
new database how to create it create and sometimesĀ if you already have the database in this list youĀ Ā
don't need to create again okay if the databaseĀ is not available then you need to create it soĀ Ā
create a database this is a command which you haveĀ to give create a database and then database name iĀ Ā
say classic models so as soon as you executed thisĀ command this will create a new database and if youĀ Ā
refresh here you can see the new database which isĀ created and inside this there are no objects areĀ Ā
available there are no database objects like weĀ don't have tables view store procedure functionsĀ Ā
right only the folders are there but we don't haveĀ any objects here this is completely new databaseĀ Ā
so now to perform the testing we need sampleĀ tables right we need to create some sample viewĀ Ā
store procedure functions and so on so we willĀ see them later so first of all let us try toĀ Ā
uh dump some sample data okay to start testingĀ so for that we whatever file we have alreadyĀ Ā
downloaded so we need to just import thisĀ data into your database so how to import thisĀ Ā
data so we need to keep this sql file in someĀ folder and then go to mysql workbench from hereĀ Ā
you need to just go to the server menu so inĀ the server menu you can find something calledĀ Ā
data import so once you click on this data importĀ and you can easily import the data into theĀ Ā
databases any of these databases andĀ we already downloaded one file it weĀ Ā
need to select the second option hereĀ because that is a self-contained fileĀ Ā
and import from self content file here we needĀ to browse our partner file so can click on thisĀ Ā
browse option and select the file whicheverĀ we downloaded it is basically dot sql fileĀ Ā
then open and once you browse the file in the nextĀ field we need to specify default to target schemaĀ Ā
so we already created classic models right so weĀ need to dump this data into the classic modelsĀ Ā
now here select the classic modelsĀ from the dropdown so which youĀ Ā
if you already created the database here whichĀ will automatically pop up in this drop downĀ Ā
and we selected the source and thisĀ is a target database and as soon asĀ Ā
i selected these two then you can say startĀ import button here you can see start importĀ Ā
and once you click on the start input all the dataĀ will be imported into your classic models databaseĀ Ā
and still it is doing it yeah so once itĀ is done you can just close this window andĀ Ā
then go to the database mac and here if i justĀ refresh this project or refresh your projectĀ Ā
refresh your database you can see the all theĀ tables are automatically populated now you canĀ Ā
also see the tables like this so which databaseĀ you are going to connect now classic model soĀ Ā
we can use one command called use classic modelsĀ and whenever you want to work with any databasesĀ Ā
here first we need to use the database this is aĀ command which will automatically connect to any ofĀ Ā
the database and from there we can execute otherĀ queries so we can just execute this statementĀ Ā
and now it is currently pointing to classicĀ models and then i want to see all the tablesĀ Ā
which are available in the classic models so weĀ can execute one more command called show tables soĀ Ā
this particular command will show you what are allĀ tables which are available in the classic modelsĀ Ā
database okay so now let us explore this uh schemaĀ of this each and every table so for that they alsoĀ Ā
given the documentation so this is actual schemaĀ of classic model database which contains a numberĀ Ā
of tables like payments customers orders officesĀ employees product lines products order detailsĀ Ā
so all together six seven eight tables areĀ there in the database and each table isĀ Ā
internally connected with the primary key andĀ foreign key so we will also validate them laterĀ Ā
and if i just look at each and every tableĀ is having their own purpose so we can justĀ Ā
look at here customers that this is theĀ table basically stores the customers dataĀ Ā
and the products is a table which is basicallyĀ stores the all the product information andĀ Ā
product lines will store different category of theĀ products and orders table will store the ordersĀ Ā
which are done by the customers or placed by theĀ customers and order details uh is another stableĀ Ā
other table which will store the sales order lineĀ items for each sale order so this will store moreĀ Ā
detailed information about the orders and paymentsĀ information payments table will store the paymentsĀ Ā
made by the customers based on their accountĀ and then employees table which is having allĀ Ā
employees data which are working under theĀ particular organization or particular storeĀ Ā
and finally offices table which stores the salesĀ office data so these are the basic uh tables whichĀ Ā
are available on which are provided as part ofĀ classic models database and which is also havingĀ Ā
some data and if you want to see some data fromĀ the customers you can simply say select star fromĀ Ā
customers and execute this query and it willĀ show you what is the data which is available inĀ Ā
this table okay similarly every table is alreadyĀ populated some data which is already availableĀ Ā
so now our environment setup is done so we haveĀ successfully installed mysql server databaseĀ Ā
second step we have downloaded mysql sampleĀ database and we have imported that into databaseĀ Ā
and also we have explored the database schemaĀ which is classic model so classic models containsĀ Ā
are totally eight tables so what are thoseĀ tables we have customers table employees tableĀ Ā
offices order details orders payments productĀ lines and products so again each table is havingĀ Ā
different number of columns and each column isĀ having different type of data types and everythingĀ Ā
so we will see all these things as part of testingĀ so this is a basic thing which we need to set upĀ Ā
before going for testing okay so in the next videoĀ we will see how we can test different objects ofĀ Ā
database like how to test the table how to testĀ the view and how to test the relation between theĀ Ā
tables okay so whatever types of testing we haveĀ discussed in the previous video so we will doĀ Ā
all kinds of testings practically on the databaseĀ objects okay that we will see in the coming videoĀ Ā
so that's all for this video guys thanksĀ for watching in the next video we will see
Browse More Related Video
Part3 : Database Testing | How To Test Schema of Database Table | Test Cases
Generate C# Model from existing Microsoft SQL Server Database
Installing MySQL and Creating Databases | MySQL for Beginners
How to install SQLite database on Windows 11 || Creating a database and table in SQLite 2023 updated
Power BI Project For Beginners | Sales Insights Data Analysis Project - 3 - Data Analysis Using SQL
view data PHP
5.0 / 5 (0 votes)