Modify a little database operations

Enhance database operations