LU08.S01 - Preparatory work

First of all we need a database schema (database workspace). Execute the following two lines on your MySQL installation.

CREATE DATABASE hr_database;
SHOW DATABASES;
USE hr_database;

After executing the three SQL commands above, the feedback from your database would look like in the image below:

Result in webstorm

Please note, that the table is actually empty, that means that a „SELECT COUNT(*) FROM employees“ leads to „0“ results.

To exercise the DML commands, we need a suitable table including a reasonable amout of data. The following SQL statement will create a table employee regarding all necessary attributes of an „average employee“.

CREATE TABLE EMPLOYEES (
  employee_ID INT PRIMARY KEY,       -- Employee ID as the primary key
  ....

Result in Webstorm

After creating the table „employees“ the result in our Webstorm ought to look like the figure above:

English German
ought to sollte

Volkan Demir

  • modul/m290/learningunits/lu07/loesungen/l01.txt
  • Zuletzt geändert: 2024/10/17 12:44
  • von vdemir