Improved database configuration