Just to elaborate, primarily, I am keen looking at a lot of procedural kind of validation/checks like,
if data is not found in 'x' table,
then insert in 'y' table from the UI form data
else insert in 'y' table from the 'x' data
There could be more such if & else with multiple data
Could someone please suggest good way to do it.