892717952 (9/14/2013)1. when I create an index in a table or views, is there any good way to konw (or evaluate) the index is necessary and correct?
That depends. If you have a live system, the missing_indexes DMVs can help you; if the candidate index is not in that DMV, the index may not help.
But if you are working on a new system, and do not have any production-like data, it can be difficult. You will have to rely to your skills and understanding of idnexes.
2. do we need to create one index in a view in which situation? if we create some indexs in the tables which is being used in a view, for this view, do we need to create a index for the view?
Indexed views is fairly advanced feature, and not all views are indexable. Go with indexes for tables in the first place.
3.when we use differenct T-SQL script to get same result, is there any tool to know which kind of T-SQL is better?
Not that I know, but the Red Gate people here may have something up their sleeves. In any case, what is "better" is not always obvious. There are some bad things you should avoid, but there can be several different constructs that can be considered "good" - but still perform bad in some situation.
4. when the database has deadlocks, how can we know which (one) processes cause these deadlocks?
The system-health session tracks deadlocks. You can also get deadlock information in the SQL Server errorlog by enabling trace flag 1222. A deadlocks is rarely due to a single process, but rather the coincidence of two or more processes.