Fixed database iterator