Improved database install script