protect the multithreaded use of the database from child classes.