text: -- Exported from QuickDBD: https://www.quickdatabasediagrams.com/
  -- Link to schema: https://app.quickdatabasediagrams.com/#/d/oVeXQD
  -- NOTE! If you have used non-SQL datatypes in your design, you will have to change these here.
  
  
  CREATE TABLE "Departments" (
      "dept_no" VARCHAR(225)   NOT NULL,
      "dept_name" VARCHAR(225)   NOT NULL,
      CONSTRAINT "pk_Departments" PRIMARY KEY (
          "dept_no"
       )
  );
  
  select * from "Departments";
  
  CREATE TABLE "Dept_Emp" (
      "emp_no" INT   NOT NULL,
      "dept_no" VARCHAR(225)   NOT NULL
  );
  
  select * from "Dept_Emp";
  
  CREATE TABLE "Dept_Manager" (
      "dept_no" VARCHAR(225)   NOT NULL,
      "emp_no" INT   NOT NULL
  );
  
  select * from "Dept_Manager";
  
  CREATE TABLE "Employees" (
      "emp_no" INT   NOT NULL,
      "emp_title" VARCHAR(225)   NOT NULL,
      "birth_date" VARCHAR(225)   NOT NULL,
      "first_name" VARCHAR(225)   NOT NULL,
      "last_name" VARCHAR(225)   NOT NULL,
      "sex" VARCHAR(225)   NOT NULL,
      "hire_date" DATE   NOT NULL,
      CONSTRAINT "pk_Employees" PRIMARY KEY (
          "emp_no"
       )
  );
  
  select * from "Employees";
  
  CREATE TABLE "Salaries" (
      "emp_no" INT   NOT NULL,
      "salary" INT   NOT NULL
  );
  
  select * from "Salaries";
  
  CREATE TABLE "Titles" (
      "title_id" VARCHAR(225)   NOT NULL,
      "title" VARCHAR(225)   NOT NULL,
      CONSTRAINT "pk_Titles" PRIMARY KEY (
          "title_id"
       )
  );
  
  select * from "Titles";
  
  ALTER TABLE "Dept_Emp" ADD CONSTRAINT "fk_Dept_Emp_emp_no" FOREIGN KEY("emp_no")
  REFERENCES "Employees" ("emp_no");
  
  ALTER TABLE "Dept_Emp" ADD CONSTRAINT "fk_Dept_Emp_dept_no" FOREIGN KEY("dept_no")
  REFERENCES "Departments" ("dept_no");
  
  ALTER TABLE "Dept_Manager" ADD CONSTRAINT "fk_Dept_Manager_dept_no" FOREIGN KEY("dept_no")
  REFERENCES "Departments" ("dept_no");
  
  ALTER TABLE "Dept_Manager" ADD CONSTRAINT "fk_Dept_Manager_emp_no" FOREIGN KEY("emp_no")
  REFERENCES "Employees" ("emp_no");
  
  ALTER TABLE "Employees" ADD CONSTRAINT "fk_Employees_emp_title" FOREIGN KEY("emp_title")
  REFERENCES "Titles" ("title_id");
  
  ALTER TABLE "Salaries" ADD CONSTRAINT "fk_Salaries_emp_no" FOREIGN KEY("emp_no")
  REFERENCES "Employees" ("emp_no");
  
  