SET SEARCH_PATH TO funalbum;
CREATE TABLE artist (
   id              SERIAL,
   name            VARCHAR(30), 
   hometown        VARCHAR(30),
   diversity       INTEGER,
   PRIMARY KEY (id)
);
CREATE TABLE genre (
   id              SERIAL,
   name            VARCHAR(30), 
   PRIMARY KEY (id)
);
CREATE TABLE album (
   artist_id       INTEGER NOT NULL,
   title           VARCHAR(50) NOT NULL, 
   year            CHAR(4),
   genre_id        INTEGER,
   PRIMARY KEY (artist_id,title),
   FOREIGN KEY (artist_id) REFERENCES artist(id),
   FOREIGN KEY (genre_id) REFERENCES genre(id)
);
