Cascading delete should work. SQLite disables foreign keys by default, but we can send a pragma command to enable them.