Explain the difference between an inner join, outer join, and self-join in DBMS, and provide a scenario where a self-join is necessary.