BEGIN TRANSACTION;
CREATE TABLE Author(
    aid SERIAL PRIMARY KEY,
    fname TEXT,
    lname TEXT
);
CREATE TABLE Quote(
    qid SERIAL PRIMARY KEY,
    qtext TEXT,
    aid INTEGER,
    source TEXT,
    qdate DATE,
    FOREIGN KEY (aid) REFERENCES Author(aid)
);
CREATE TABLE Category(
    cid SERIAL PRIMARY KEY,
    description TEXT
);
CREATE TABLE QuoteCategory(
    qid INTEGER,
    cid INTEGER,
    FOREIGN KEY(qid) REFERENCES Quote(qid),
    FOREIGN KEY(cid) REFERENCES Category(cid)
);
COMMIT;
