(V1.0) Fix Delete() bugs in the database

Signed-off-by: Hui Zheng <fengyimzy@gmail.com>