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

-- Table: concert
CREATE TABLE "spider__concert_singer"."concert" (
    "concert_ID" BIGINT NOT NULL,
    "concert_Name" TEXT,
    "Theme" TEXT,
    "Stadium_ID" TEXT,
    "Year" TEXT,
    CONSTRAINT "concert_pkey" PRIMARY KEY ("concert_ID")
);

-- Table: singer
CREATE TABLE "spider__concert_singer"."singer" (
    "Singer_ID" BIGINT NOT NULL,
    "Name" TEXT,
    "Country" TEXT,
    "Song_Name" TEXT,
    "Song_release_year" TEXT,
    "Age" BIGINT,
    "Is_male" BOOLEAN,
    CONSTRAINT "singer_pkey" PRIMARY KEY ("Singer_ID")
);

-- Table: singer_in_concert
CREATE TABLE "spider__concert_singer"."singer_in_concert" (
    "concert_ID" BIGINT NOT NULL,
    "Singer_ID" TEXT NOT NULL,
    CONSTRAINT "singer_in_concert_pkey" PRIMARY KEY ("concert_ID", "Singer_ID")
);

-- Table: stadium
CREATE TABLE "spider__concert_singer"."stadium" (
    "Stadium_ID" BIGINT NOT NULL,
    "Location" TEXT,
    "Name" TEXT,
    "Capacity" BIGINT,
    "Highest" BIGINT,
    "Lowest" BIGINT,
    "Average" BIGINT,
    CONSTRAINT "stadium_pkey" PRIMARY KEY ("Stadium_ID")
);

-- Foreign Keys
ALTER TABLE "spider__concert_singer"."singer_in_concert" ADD CONSTRAINT "fk_singer_in_concert_1" FOREIGN KEY ("concert_ID") REFERENCES "spider__concert_singer"."concert" ("concert_ID") ON DELETE NO ACTION ON UPDATE NO ACTION;
