After establishing database connection, database cursor is created so that the sql query may be executed through it to obtain resultset.