How to maintain referential integrity.