CREATE TABLE people ( id_people SERIAL PRIMARY KEY, name text ); CREATE TABLE author ( id_author SERIAL PRIMARY KEY, ref_people int4 ); CREATE TABLE user ( id_user SERIAL PRIMARY KEY, ref_people int4, expiration date DEFAULT 'now' ); CREATE TABLE book ( id_book SERIAL PRIMARY KEY, title text, author text, ref_user int4, date date DEFAULT 'now' ); CREATE TABLE manager ( id_manager SERIAL PRIMARY KEY, password text, ref_people int4 ); CREATE TABLE write ( id_write SERIAL PRIMARY KEY, ref_book int4, ref_author int4 );