Set of generators in an abelian category - two definitions Let $\mathcal C$ be a category. We say that $\mathcal C$ has a set of generators $\{ G_i\}_{i \in I}$ if whenever we take two distinct morphisms $f, g \colon A \to B$ in $\mathcal C$ there exists some $i \in I$ and a morphism $h \colon G_i \to A$ such that $fh \not= gh$. 
However, I have also read the following definition of a set of generators in an abelian category - If $\mathcal C$ is abelian, we say that $\mathcal C$ has a set of generators $\{ G_i \}_{i \in I}$ if whenever $B$ is a subobject of $A$ such that $B \not = A$ then there exists some $i \in I$ and a morphism $h \colon G_i \to A$ such that $\operatorname{Im}h$ is not a subobject of $B$.
Are these two definitions equivalent in an abelian category? If so, why?
 A: The two definitions are equivalent in any cocomplete abelian category, or more generally, any locally small category with equalisers and small coproducts in which all epimorphisms are extremal.
Recall: An extremal epimorphism is an epimorphism $f : A \to B$ with the following property:


*

*If $f = m \circ f'$ for some monomorphism $m : B' \to B$, then $m$ is an isomorphism.


Remarks. In a category with equalisers, any morphism with the above property is automatically an epimorphism. In an abelian category, every epimorphism is normal, hence regular, strong, and extremal a fortiori.
Let's also rephrase your two definitions in a more constructive way without pesky negations.
Definition. Let $\mathcal{C}$ be a category and let $\mathcal{G} = \{ G_i : i \in I \}$ be a family of objects in $\mathcal{C}$. We say $\mathcal{G}$ is a separating family for $\mathcal{C}$ just if the following holds:


*

*If $f \circ h = g \circ h$ for all $h : G_i \to A$ and all $G_i$ in $\mathcal{G}$, then $f = g$.


And we say $\mathcal{G}$ is an extremal separating family for $\mathcal{C}$ when this holds:


*

*If $m : A' \to A$ is a monomorphism such that every morphism $G_i \to A$ factors through $m$ for all $G_i$ in $\mathcal{G}$, then $m$ is an isomorphism.


Proposition. Let $\mathcal{C}$ be a locally small category with equalisers and small coproducts, and let $\mathcal{G} = \{ G_i : i \in I \}$ be a small family of objects in $\mathcal{C}$. Let $G = \coprod_{i \in I} G_i$.


*

*$\mathcal{G}$ is a separating family if and only if, for all objects $A$ in $\mathcal{C}$, the canonical morphism $\coprod_{f \in \mathcal{C}(G_i, A)} G_i \to A$ is an epimorphism.

*$\mathcal{G}$ is an extremal separating family if and only if, for all objects $A$ in $\mathcal{C}$, the canonical morphism $\coprod_{f \in \mathcal{C}(G_i, A)} G_i \to A$ is a extremal epimorphism.
Proof. This is a straightforward exercise.
Corollary. If $\mathcal{C}$ is a locally small category with equalisers and small coproducts, and all epimorphisms in $\mathcal{C}$ are extremal, then every small separating family for $\mathcal{C}$ is also a extremal separating family.　◼
