add some database operations