How to delete orphaned child rows in Postgres database?
<p>I have a Postgres database with orphaned child rows in some tables. (No parent table rows for child table).</p>

<p>I wonder how it is possible in Database tables. My questions are,</p>

<ol>
<li>How this situation occurs in database? Any best practices for avoiding this?</li>
<li>How to delete only orphaned child rows?</li>
</ol>