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

-- Table: book
CREATE TABLE "spider__book_2"."book" (
    "Book_ID" BIGINT NOT NULL,
    "Title" TEXT,
    "Issues" DOUBLE PRECISION,
    "Writer" TEXT,
    CONSTRAINT "book_pkey" PRIMARY KEY ("Book_ID")
);

-- Table: publication
CREATE TABLE "spider__book_2"."publication" (
    "Publication_ID" BIGINT NOT NULL,
    "Book_ID" BIGINT,
    "Publisher" TEXT,
    "Publication_Date" TEXT,
    "Price" DOUBLE PRECISION,
    CONSTRAINT "publication_pkey" PRIMARY KEY ("Publication_ID")
);

-- Foreign Keys
ALTER TABLE "spider__book_2"."publication" ADD CONSTRAINT "fk_publication_0" FOREIGN KEY ("Book_ID") REFERENCES "spider__book_2"."book" ("Book_ID") ON DELETE NO ACTION ON UPDATE NO ACTION;
