title: Many-to-many relation - automatically delete orphans
body: <p>Assume a many-to-many relation between team and player. This is modelled by the following tables:</p>
  
  <pre><code>create table team
  (
      identifier integer primary key
  );
  
  create table player
  (
      identifier integer primary key
  );
  
  create table member
  (
      team_identifier integer,
      player_identifier integer,
  
      primary key(team_identifier, player_identifier),
      foreign key(team_identifier) references team on update cascade on delete cascade,
      foreign key(player_identifier) references player on update cascade on delete cascade
  );
  </code></pre>
  
  <p>Assume the following data:</p>
  
  <pre><code>insert into team values(1);
  insert into team values(2);
  
  insert into player values(1);
  
  insert into member values(1, 1);
  insert into member values(2, 1);
  </code></pre>
  
  <p>Let's delete the teams:</p>
  
  <pre><code>delete from team where identifier = 1;
  delete from team where identifier = 2;
  </code></pre>
  
  <p>Now we have a player without a team. Is there a way to automatically delete this player? That is, when the deletion of a team results in an orphan player, this player should be removed as well (but not the other way around).</p>