Prepare db work