Skip to content

kbenavides1312/mysql-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mysql-workshop

Exploring SQL Language

Setup

Follow steps provided in How to install MySQL 8.0.30 Server and Workbench latest version on Windows 10

Note: Add mysql path to environment variables so it can be used from terminal itself.

Verifying your setup

  1. Login using workshop_admin user

Note: I have created an admin user named workshop_admin. You could use any other that you created during setup

mysql -u workshop_admin -p
output
C:\Users\Kenneth>mysql -u root -p
Enter password: **************
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 24
Server version: 8.0.33 MySQL Community Server - GPL

Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


  1. Show existing databases
show databases;
output
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
4 rows in set (0.00 sec)


  1. Create my first database
create database my_fisrt_db;
output
mysql> create database my_fisrt_db;
Query OK, 1 row affected (0.01 sec)


  1. Show my first database in list
show databases;
output
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| my_fisrt_db        |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
4 rows in set (0.00 sec)

Design

Below you can find the Entity Relationship Diagram built in MySQL Workbench.

Find attached here tables for this practice

Hands on


  • Deploy database, tables and triggers automatically by using deploy_db.sh. You could also perform each query in case you want to observe closely what happens after each of them.

  • You could use populate_db.sh to populate tables on the just created database.

  • Check and compare what values have been entered automatically and which have been created due to our queries on each table.

SELECT * FROM User;

SELECT * FROM Game;

SELECT * FROM GameDetails;

SELECT * FROM Score;

  • Finally you can drop the workshop db by running drop_db.sh script

About

Exploring SQL Language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages