prepare db