Friends!! Good Morning!! please I need help with this little problem.
I made a patient management system for medical centers, the system works very well, the problem is that I realized that when removing a patient or another field, the data erased them directly from the root, and they should not because even if the staff disappears there should be a record in the database.
How could I solve this small inconvenience?
I thought about creating a table that contained the same data to use as a backup, but I really do not know how this logic could be applied, since I can not find a way to save them in the backup table when I save a new record in the table that already exists, please help.