creating connection and database