add ids to db.