text: DROP DATABASE IF EXISTS employee_DB;
  CREATE DATABASE employee_DB;
  
  USE employee_DB;
  
  CREATE TABLE departments(
      id INT NOT NULL AUTO_INCREMENT,
      department VARCHAR(30) NOT NULL,
      PRIMARY KEY (id)
  );
  
  CREATE TABLE roles(
      id INT NOT NULL AUTO_INCREMENT,
      title VARCHAR(30),
      salary DECIMAL(12,2) NOT NULL,
      department_id INT,
      PRIMARY KEY (id),
      FOREIGN KEY (department_id) REFERENCES departments(id) ON DELETE SET NULL
  );
  
  CREATE TABLE employees(
      id INT NOT NULL AUTO_INCREMENT,
      first_name VARCHAR(30) NOT NULL,
      last_name VARCHAR(30) NOT NULL,
      role_id INT,
      manager_id INT,
      PRIMARY KEY (id),
      FOREIGN KEY (role_id) REFERENCES roles(id) ON DELETE SET NULL,
      FOREIGN KEY (manager_id) REFERENCES employees(id) ON DELETE SET NULL
  );
  
  /* 
  Note:
  Discussion ON DELETE CASCADE, and ON DELETE SET NULL
  Deleting row from a table with foreign key constraints
  https://stackoverflow.com/questions/58893063/deleting-row-from-a-table-with-foreign-key-constraints
   */