I am just thinking of updating one table and deleting another table with foreign key of update table.
For example:
Table_1
studentId | name | ex