/SQL_Testing_QADatabase

A database created to practice SQL commands using data related to Testing and QA

SQLTestingQADatabase

A database created to practice SQL commands using data related to Testing and QA area.

Goals

This repository was created for educational purposes. You will be able to create, populate and execute SQL commands.

Relational database management system (RDMS)

Entity-Relation Diagram

Pre-requisites to run SQL from this repository

  • MySQL Community Server >= 8.0.22
  • MySQL Workbench >= 8.0.22 (explicitly verify that it is checked to be installed in the MySQL Community Server installation options).

How to run MySQL Community Server via Docker

This command will create the MySQL image and a container with MySQL running at 3366 TCP port. The password is defined inside the docker-compose.yml file. You can change the password in the script before run the command.

  1. Docker needs to be running

  2. Run the command:

docker-compose up

Preparing the repository

Open and run the following scripts on MySQL Workbench SQL editor:

  1. Creation schema script "1_SQLTestingQASchemaCreationScript.sql". Expected: Your sqltestingqa schema is created and listed in the MySQL Workbench left panel called SCHEMAS.

  2. Load data schema script "2_SQLTestingQASchemaLoadDataScript.sql". Expected: Your tables are loaded with data.

SQL commands

All SQL commands are available in the "3_SQLSelectScripts.sql" file.

Specific languages

  • DDL (Data Definition Language) - database object interaction: CREATE, ALTER e DROP
  • DML (Data Manipulation Language) - data inside tables interaction: INSERT, DELETE e UPDATE
  • DQL (Data Query Language): SELECT
  • DTL (Data Transaction Language) - transaction controlling: BEGIN TRANSACTION, COMMIT E ROLLBACK
  • DCL (Data Control Language) - database security controlling: GRANT, REVOKE E DENY.