I have seen two definitions of intersection product in Aglebraic Geometry so far: one using the Chow ring of a variety (as defined for example in 3264 and all that, by Eisenbud and Harris) and the other one using sheaf cohomology (as defined for example in Vakil's notes, def. 20.1.1., or in Hartshorne's Ample subvarieties of algebraic varieties).
How are these two definitions related?
If we take $D$ to be a nice effective divisor on our (smooth, projective...) variety $X$ and we take $Y$ to be an $s$-dimensional subvariety, do we have the following equality?
(The left hand side being the definition using sheaf cohomology and the right hand side the definition using algebraic cycles).
What if we take $s$ different divisors? Under what conditions do we have equality?
For example in the case of surfaces the two products should agree, right?