deal with db