text: CREATE DATABASE catalog_of_things;
  
  CREATE TABLE Genre(
    id      INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
    name    VARCHAR(100)
  );
  
  CREATE TABLE Label(
    id      INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
    title   VARCHAR(100),
    color   VARCHAR(100)
  );
  
  CREATE TABLE Author(
    id INT GENERATED ALWAYS AS IDENTITY,
    first_name VARCHAR(50),
    last_name VARCHAR(50),
    PRIMARY KEY (id)
  );
  
  CREATE TABLE Book(
    id            INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
    genre_id      INTEGER,
    author_id     INTEGER,
    author_id     INTEGER,
    publish_date  DATE,
    archived      BOOLEAN,
    publisher     VARCHAR(250),
    cover_state   VARCHAR(4),
  
    FOREIGN KEY (genre_id) REFERENCES Genre(id)
    FOREIGN KEY (author_id) REFERENCES Author(id)
    FOREIGN KEY (label_id) REFERENCES Label(id)
  );
  
  CREATE TABLE Game(
    id INT GENERATED ALWAYS AS IDENTITY,
    publish_date DATE,
    author_id INT,
    archived BOOLEAN,
    last_played_at DATE,
    multiplayer BOOLEAN,
    PRIMARY KEY (id),
    CONSTRAINT fk_game
      FOREIGN KEY(author_id) 
  	    REFERENCES Author(id)
  	      ON DELETE SET NULL
  );
  
  CREATE TABLE MusicAlbum(
    id            INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
    genre_id      INTEGER,
    author_id     INTEGER,
    label_id      INTEGER,
    publish_date  DATE,
    archived      BOOLEAN,
    name     VARCHAR(250),
    on_spotify    BOOLEAN,
  
    FOREIGN KEY (genre_id) REFERENCES Genre(id)
    FOREIGN KEY (author_id) REFERENCES Author(id)
    FOREIGN KEY (label_id) REFERENCES Label(id)
  );
  
  