Relations are somewhat a new concept for me in object-oriented programming and I feel kinda insecure using them.
When you have bad data in a table, it seems natural and easy to clean it up, as it consists of concrete rows in a table.
My question is slightly abstract: what is the best approach to clean relations if you have data integrity issues?
One option that come to mind: Make sure that you have reference data in each table (Clients table contains address ID, address table contains client id) so that you can delete all relations and recreate them if the relations contain mistakes.
Please excuse the abstract question but any thoughts are appreciated as I ease into object-oriented programming and get used to the fact that “relations” aren’t exactly objects or data in a table somewhere…