CREATE TABLE AUTHORS (
    ID INT GENERATED ALWAYS AS IDENTITY
        PRIMARY KEY,
    NAME TEXT
);

ALTER TABLE BOOKS
    ADD COLUMN AUTHOR_ID INT;

ALTER TABLE BOOKS
    ADD CONSTRAINT AUTHOR_ID_FK
        FOREIGN KEY (AUTHOR_ID)
        REFERENCES AUTHORS (ID);
