text: DROP DATABASE IF EXISTS company;
  CREATE DATABASE company;
  USE company;
  
  DROP TABLE IF EXISTS departments;
  DROP TABLE IF EXISTS roles;
  DROP TABLE IF EXISTS managers;
  DROP TABLE IF EXISTS employees;
  
  CREATE TABLE departments (
      id INTEGER PRIMARY KEY AUTO_INCREMENT,
      department_name VARCHAR(30) NOT NULL
  );
  
  CREATE TABLE roles (
      id INTEGER PRIMARY KEY AUTO_INCREMENT,
      title VARCHAR(30) NOT NULL,
      salary DECIMAL NOT NULL,
      department_id INTEGER NOT NULL,
      CONSTRAINT fk_department FOREIGN KEY (department_id) REFERENCES departments(id)
  );
  
  CREATE TABLE managers (
      id INTEGER PRIMARY KEY AUTO_INCREMENT,
      name VARCHAR(30) NOT NULL,
      department_id INTEGER NOT NULL,
      CONSTRAINT fk2_department FOREIGN KEY (department_id) REFERENCES departments(id)
  );
  
  CREATE TABLE employees (
      id INTEGER PRIMARY KEY AUTO_INCREMENT,
      first_name VARCHAR(30) NOT NULL,
      last_name VARCHAR(30) NOT NULL,
      role_id INTEGER NOT NULL,
      manager_id INTEGER,
      CONSTRAINT fk_manager FOREIGN KEY (manager_id) REFERENCES managers(id),
      CONSTRAINT fk_role FOREIGN KEY (role_id) REFERENCES roles(id)
  );