one master db, habitat codes and batches
share db connection amongst functions