database access in usually single-thread