Changed database construction to allow other adapter connection methods.