text: DROP DATABASE IF EXISTS office_db;
  CREATE DATABASE office_db;
  USE office_db;
  
  CREATE TABLE department (
      id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
      name VARCHAR(20) UNIQUE NOT NULL
  );
  
  CREATE TABLE role (
      id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
      title VARCHAR(20) UNIQUE NOT NULL,
      salary DECIMAL UNSIGNED NOT NULL, 
      department_id INT UNSIGNED NOT NULL,
      INDEX dep_index (department_id),
      CONSTRAINT fk_department FOREIGN KEY (department_id) REFERENCES department(id) ON DELETE CASCADE
  );
  
  CREATE TABLE employee (
    id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
    first_name VARCHAR(30) NOT NULL,
    last_name VARCHAR(30) NOT NULL,
    role_id INT UNSIGNED NOT NULL,
    INDEX role_ind (role_id),
    CONSTRAINT fk_role FOREIGN KEY (role_id) REFERENCES role(id) ON DELETE CASCADE,
    manager_id INT UNSIGNED,
    INDEX man_ind (manager_id),
    CONSTRAINT fk_manager FOREIGN KEY (manager_id) REFERENCES employee(id) ON DELETE SET NULL
  );
  
  