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

-- Table: Club
CREATE TABLE "spider__club_1"."Club" (
    "ClubID" BIGINT NOT NULL,
    "ClubName" TEXT,
    "ClubDesc" TEXT,
    "ClubLocation" TEXT,
    CONSTRAINT "Club_pkey" PRIMARY KEY ("ClubID")
);

-- Table: Member_of_club
CREATE TABLE "spider__club_1"."Member_of_club" (
    "StuID" BIGINT,
    "ClubID" BIGINT,
    "Position" TEXT
);

-- Table: Student
CREATE TABLE "spider__club_1"."Student" (
    "StuID" BIGINT NOT NULL,
    "LName" TEXT,
    "Fname" TEXT,
    "Age" BIGINT,
    "Sex" TEXT,
    "Major" BIGINT,
    "Advisor" BIGINT,
    "city_code" TEXT,
    CONSTRAINT "Student_pkey" PRIMARY KEY ("StuID")
);

-- Foreign Keys
ALTER TABLE "spider__club_1"."Member_of_club" ADD CONSTRAINT "fk_Member_of_club_0" FOREIGN KEY ("ClubID") REFERENCES "spider__club_1"."Club" ("ClubID") ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE "spider__club_1"."Member_of_club" ADD CONSTRAINT "fk_Member_of_club_1" FOREIGN KEY ("StuID") REFERENCES "spider__club_1"."Student" ("StuID") ON DELETE NO ACTION ON UPDATE NO ACTION;
