Moved stuff to DatabaseBase class.