Insert and delete values in an async task.

TODO: something is wrong with the foreign keys constraints
Fix the constraint issue

It might have been because of invalid test data