Completed DB initialisation code.