prepare for DB operation.