Short exact sequence of sheaves and intersection of curves Let $C_1$ and $C_2$ be two (smooth rational) curves, $D=C_1+C_2$, $C_1\cap C_2=p$ (a single point). Then how can I show that there is a short exact sequence of sheaves
$
0\rightarrow \mathcal{O}_{C_2}(-p)\rightarrow  \mathcal{O}_{D} \rightarrow \mathcal{O}_{C_1}\rightarrow 0 ?
$
Thanks!
 A: Let $D = C_1\cup C_2$ be any projective reducible curve with two components meeting transversally in a point $C_1\cap C_2 = \{p\}$. A regular function $f$ on $D$ is the datum of a regular functions $f_1$ on $C_1$ and $f_2$ on $C_2$ such that $f_1(p) = f_2(p)$. The restriction map
$$\mathcal{O}_{D}\rightarrow\mathcal{O}_{C_1},\: f\mapsto f_{|C_1}$$
is clearly surjective. Indeed if $g$ is a regular function on $C_1$ on the other component $C_2$ just take the constant function $f_{2} = g(p)$.
The kernel of this restriction map are just the regular functions $f$ on $D$ such that $f_1 = f_{|C_1} = 0$. Then $f_{1}(p) = 0$ and $f_{2}(p) = f_{|C_2}(p) = f_1(p) = 0$. That is the kernel of the restriction map are the regular functions on $C_2$ vanishing at $p$, i.e. sections of $\mathcal{O}_{C_2}(-p)$. Finally we get the exact sequence
$$0\mapsto\mathcal{O}_{C_2}(-p)\rightarrow\mathcal{O}_{D}\rightarrow\mathcal{O}_{C_1}\mapsto 0.$$
A: In greater generality, suppose $X\subset Y$ is a subvariety.  Then there is a restriction exact sequence 
$$0\to I_{X\subset Y} \to \mathcal O_Y \to \mathcal O_X\to 0$$ where $I_{X\subset Y}$ is the ideal sheaf of $X$ in $Y$.  Your question is the case where $Y=D$ and $X=C_1$.
