What is the Role of a District Attorney?

The role of a district attorney is basically to convict people that are tried in crimes. This is a bit of a conflict because they are judged on their convictions not who they convict.