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

-- Table: Web_client_accelerator
CREATE TABLE "spider__browser_web"."Web_client_accelerator" (
    "id" BIGINT NOT NULL,
    "name" TEXT,
    "Operating_system" TEXT,
    "Client" TEXT,
    "Connection" TEXT,
    CONSTRAINT "Web_client_accelerator_pkey" PRIMARY KEY ("id")
);

-- Table: accelerator_compatible_browser
CREATE TABLE "spider__browser_web"."accelerator_compatible_browser" (
    "accelerator_id" BIGINT NOT NULL,
    "browser_id" BIGINT NOT NULL,
    "compatible_since_year" BIGINT,
    CONSTRAINT "accelerator_compatible_browser_pkey" PRIMARY KEY ("accelerator_id", "browser_id")
);

-- Table: browser
CREATE TABLE "spider__browser_web"."browser" (
    "id" BIGINT NOT NULL,
    "name" TEXT,
    "market_share" DOUBLE PRECISION,
    CONSTRAINT "browser_pkey" PRIMARY KEY ("id")
);

-- Foreign Keys
ALTER TABLE "spider__browser_web"."accelerator_compatible_browser" ADD CONSTRAINT "fk_accelerator_compatible_browser_0" FOREIGN KEY ("browser_id") REFERENCES "spider__browser_web"."browser" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE "spider__browser_web"."accelerator_compatible_browser" ADD CONSTRAINT "fk_accelerator_compatible_browser_1" FOREIGN KEY ("accelerator_id") REFERENCES "spider__browser_web"."Web_client_accelerator" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION;
