 <p>Create the "child" table to cascade the delete from the referenced "parent" table. Something like this:</p> <pre><code>CREATE TABLE answers ( id SERIAL, question_id int REFERENCES questions(id) ON DELETE CASCADE, ... ); </code></pre> <p>Now, deleting the question records will also delete the referenced answer records.</p>