-- Schema: spider__company_1
CREATE SCHEMA IF NOT EXISTS "spider__company_1";

-- Table: department
CREATE TABLE "spider__company_1"."department" (
    "Dname" TEXT,
    "Dnumber" BIGINT NOT NULL,
    "Mgr_ssn" BIGINT,
    "Mgr_start_date" TEXT,
    CONSTRAINT "department_pkey" PRIMARY KEY ("Dnumber")
);

-- Table: dependent
CREATE TABLE "spider__company_1"."dependent" (
    "Essn" BIGINT NOT NULL,
    "Dependent_name" TEXT NOT NULL,
    "Sex" TEXT,
    "Bdate" TEXT,
    "Relationship" TEXT,
    CONSTRAINT "dependent_pkey" PRIMARY KEY ("Essn", "Dependent_name")
);

-- Table: dept_locations
CREATE TABLE "spider__company_1"."dept_locations" (
    "Dnumber" BIGINT NOT NULL,
    "Dlocation" TEXT NOT NULL,
    CONSTRAINT "dept_locations_pkey" PRIMARY KEY ("Dnumber", "Dlocation")
);

-- Table: employee
CREATE TABLE "spider__company_1"."employee" (
    "Fname" TEXT,
    "Minit" TEXT,
    "Lname" TEXT,
    "Ssn" BIGINT NOT NULL,
    "Bdate" TEXT,
    "Address" TEXT,
    "Sex" TEXT,
    "Salary" BIGINT,
    "Super_ssn" BIGINT,
    "Dno" BIGINT,
    CONSTRAINT "employee_pkey" PRIMARY KEY ("Ssn")
);

-- Table: project
CREATE TABLE "spider__company_1"."project" (
    "Pname" TEXT,
    "Pnumber" BIGINT NOT NULL,
    "Plocation" TEXT,
    "Dnum" BIGINT,
    CONSTRAINT "project_pkey" PRIMARY KEY ("Pnumber")
);

-- Table: works_on
CREATE TABLE "spider__company_1"."works_on" (
    "Essn" BIGINT NOT NULL,
    "Pno" BIGINT NOT NULL,
    "Hours" DOUBLE PRECISION,
    CONSTRAINT "works_on_pkey" PRIMARY KEY ("Essn", "Pno")
);
