Thats is a very wrong belief, death sentence is being given fo thousands of years all over the world. If what you are saying is true, then there should not be any criminals anywhere. I will give you a good example, take the case of USA, maximum death sentences occur in that country, but that does not deter the criminals. USA is a very violent country with lot of murders, rape etc. Quite clearly this logic does not work there. When someone is commiting a crime he/she does not remember that he/she will be punished for it. Then he/she will not do it.