Understanding databases is an essential skill for information security professionals. In this hands-on lab, you will learn about relational databases and how to perform SQL statements.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Create a Student Record
Create a student record for yourself, and assign yourself a 3.7 grade point average (GPA).
Get started by using the command:
sudo mysql
Start MariaDB and access the database using the command:
use school;
Hint: Use the following command to see all the tables in the database:
show tables;
Hint: Use the following command to see all the columns in a table:
desc <table>;
- Identify Available Courses
Investigate the
courses
table, and find out which courses are available at the school.- Find a Teacher’s Salary
Find the salary amounts for the teachers of courses
cs101
andcs201
using theWHERE
andOR
SQL statements.- Create a Teacher Record
Create a teacher record for a teacher named
tom pine
, who is paid a salary of35000
.- Update cs201
Assign
tom pine
as the teacher ofcs201
, using theUPDATE
statement, and then add yourself to the course.