Due to the lack of 'proper' referential integrity,
neither MSSQL not Postgres (and probably all other
supported DBs except Oracle) actually delete records
from the system.
The code is written to exploit the 'ON DELETE CASCADE'
clause which used when creating tables. What is
supposed to happen is that the record is deleted from
the root of the tree and the DB is supposed to use
FOREIGN KEYS to visit linked table entries and delete
these too.
As far as I can tell neither Postgres not MSSQL
actually 'do' FOREIGN KEYS' properly.
Java code (or SQL triggers) will have to be added to
'manually' delete records.