edit database and index