Updated db creation method