{"program": {"columns": [[0, "Program_ID", "INT", 0, null, 1], [1, "Name", "TEXT", 0, null, 0], [2, "Origin", "TEXT", 0, null, 0], [3, "Launch", "REAL", 0, null, 0], [4, "Owner", "TEXT", 0, null, 0]], "primary_keys": ["Program_ID"], "foreign_keys": [], "unique_constraints": [[[0, 0, "Program_ID"]]], "check_constraints": []}, "channel": {"columns": [[0, "Channel_ID", "INT", 0, null, 1], [1, "Name", "TEXT", 0, null, 0], [2, "Owner", "TEXT", 0, null, 0], [3, "Share_in_percent", "REAL", 0, null, 0], [4, "Rating_in_percent", "REAL", 0, null, 0]], "primary_keys": ["Channel_ID"], "foreign_keys": [], "unique_constraints": [[[0, 0, "Channel_ID"]]], "check_constraints": []}, "broadcast": {"columns": [[0, "Channel_ID", "INT", 0, null, 1], [1, "Program_ID", "INT", 0, null, 2], [2, "Time_of_day", "TEXT", 0, null, 0]], "primary_keys": ["Channel_ID", "Program_ID"], "foreign_keys": [[0, 0, "program", "Program_ID", "Program_ID", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "channel", "Channel_ID", "Channel_ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "Channel_ID"], [1, 1, "Program_ID"]]], "check_constraints": []}, "broadcast_share": {"columns": [[0, "Channel_ID", "INT", 0, null, 1], [1, "Program_ID", "INT", 0, null, 2], [2, "Date", "TEXT", 0, null, 0], [3, "Share_in_percent", "REAL", 0, null, 0]], "primary_keys": ["Channel_ID", "Program_ID"], "foreign_keys": [[0, 0, "program", "Program_ID", "Program_ID", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "channel", "Channel_ID", "Channel_ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "Channel_ID"], [1, 1, "Program_ID"]]], "check_constraints": []}}
CREATE TABLE program (
    Program_ID INT   PRIMARY KEY,
    Name TEXT,
    Origin TEXT,
    Launch REAL,
    Owner TEXT,
    UNIQUE (Program_ID)
);

CREATE TABLE channel (
    Channel_ID INT   PRIMARY KEY,
    Name TEXT,
    Owner TEXT,
    Share_in_percent REAL,
    Rating_in_percent REAL,
    UNIQUE (Channel_ID)
);

CREATE TABLE broadcast (
    Channel_ID INT   PRIMARY KEY,
    Program_ID INT   PRIMARY KEY,
    Time_of_day TEXT,
    PRIMARY KEY (Channel_ID, Program_ID),
    UNIQUE (Channel_ID, Program_ID),
    FOREIGN KEY (Program_ID) REFERENCES program(Program_ID),
    FOREIGN KEY (Channel_ID) REFERENCES channel(Channel_ID)
);

CREATE TABLE broadcast_share (
    Channel_ID INT   PRIMARY KEY,
    Program_ID INT   PRIMARY KEY,
    Date TEXT,
    Share_in_percent REAL,
    PRIMARY KEY (Channel_ID, Program_ID),
    UNIQUE (Channel_ID, Program_ID),
    FOREIGN KEY (Program_ID) REFERENCES program(Program_ID),
    FOREIGN KEY (Channel_ID) REFERENCES channel(Channel_ID)
);