/sql % tables CREATE TABLE t_authors(id int PRIMARY KEY, name int); CREATE TABLE t_publications(id int PRIMARY KEY , title int ); CREATE OR REPLACE TABLE t_pub2auth(id_pub int, id_author int, ordine int, primary key (id_pub,id_author), FOREIGN KEY (id_pub) REFERENCES t_publications(id), FOREIGN KEY (id_author) REFERENCES t_authors(id)); % views CREATE OR REPLACE VIEW v_aut_withp(author, name) AS select a.id AS author, a.name AS name from t_authors AS a where exists (select * from t_pub2auth where a.id = t_pub2auth.id_author);