Support Topics Documentation Slack YouTube Blog

Is there a best practice to Quality Control setting the right relations?

Hi there,
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…

Hello @Andreas_Marinopoulos

You need to analyze the relations between the tables and draw a relationship diagram (backendless visual modeler can help you). Deletion must begin with the table that is not referenced by other tables. After deleting this table, its links are also deleted and you repeat the process until the deletion from all tables on the diagram is over.

However, if you want to completely clean up the database, then you can delete everything without paying attention to the relations between the tables.

Regards,
Inna