pre database task