It could be related to my previous question [here](https://mathoverflow.net/questions/271163/different-definitions-of-derived-functors).


Let $\mathcal F$ be a sheaf on a topological space $X$. Hartshorne in his book on Algebraic geometry defines the sheaf cohomology by
$$
H^i(X, \mathcal F)= R^i\Gamma(X,-)(\mathcal F)$$


Alternatively in some other literature (like [this](http://www.claymath.org/library/monographs/cmim04.pdf)) one defines the sheaf cohomology for a *coherent sheaf* $\mathcal E$ by putting $$H^i( X, \mathcal E) = \mathrm{Ext}^i( \mathcal O\_X, \mathcal E) \equiv \mathrm{Hom}\_{D^b(\mathrm {Coh}(X))} (\mathcal O\_X, \mathcal E[i])$$ in the setting of derived category of $X$.



> 
> How to relate these seemingly two different definitions of sheaf cohomology agree? Notice that the latter definition only applies for coherent sheaves, so can I say the first definition of sheaf cohomology is better? Can I rewrite the first definition using the derived category?
> 
> 
> 



Different definition of sheaf cohomology
Taking global sections is the same thing as computing the hom from $O\_X$. In other words, there is an isomorphism of functors $\Gamma(X,-)\cong\hom(O\_X,-)$, so both functors have the same derived functors.


As for using the derived category to define cohomology: yes, simply because that is what the derived category is for! 


