cursor and transaction are nested inside database