{"Movie": {"columns": [[0, "mID", "INT", 0, null, 1], [1, "title", "TEXT", 0, null, 0], [2, "year", "INT", 0, null, 0], [3, "director", "TEXT", 0, null, 0]], "primary_keys": ["mID"], "foreign_keys": [], "unique_constraints": [[[0, 0, "mID"]]], "check_constraints": []}, "Reviewer": {"columns": [[0, "rID", "INT", 0, null, 1], [1, "name", "TEXT", 0, null, 0]], "primary_keys": ["rID"], "foreign_keys": [], "unique_constraints": [[[0, 0, "rID"]]], "check_constraints": []}, "Rating": {"columns": [[0, "rID", "INT", 0, null, 0], [1, "mID", "INT", 0, null, 0], [2, "stars", "INT", 0, null, 0], [3, "ratingDate", "date", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "Reviewer", "rID", "rID", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "Movie", "mID", "mID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}}
CREATE TABLE Movie (
    mID INT   PRIMARY KEY,
    title TEXT,
    year INT,
    director TEXT,
    UNIQUE (mID)
);

CREATE TABLE Reviewer (
    rID INT   PRIMARY KEY,
    name TEXT,
    UNIQUE (rID)
);

CREATE TABLE Rating (
    rID INT,
    mID INT,
    stars INT,
    ratingDate date,
    FOREIGN KEY (rID) REFERENCES Reviewer(rID),
    FOREIGN KEY (mID) REFERENCES Movie(mID)
);