Create database if it does not exist and other enhancements.