On page 47 of A. Zee's QFT in a Nutshell, he explains how disconnected Feynman diagrams can be built from lower-order connected diagrams:
I don't know how to understand formula $(6)$.
I understand that there must be a way to "decompose" $Z(J,\lambda)$ into connected Feynman diagrams. After all, if we know the coefficients for the "straight line" $|$ and for the vacuum bubble $8$, we should be able to calculate the coefficient for the combined diagram $|8$ from the "parts".
But how exactly does that work? Maybe I can work out the details if I have one concrete example of a term $W(J,\lambda)$, but all my efforts so far were fruitless.
To show my efforts, here's one example: I tried to use $(6)$ on the concrete example $Z(2,1)$:
$$ \frac{5}{16m^6}(-\lambda)J^2 = Z(J=2, \lambda=1) \overset{(6)}{=} Z(J=0, \lambda=1) e^{W(J, \lambda)} = \frac{1}{8m^4}(-\lambda)e^{W(J, \lambda)} $$
This leads to
$$ e^{W(J, \lambda)} = \frac{5}{2m^2}J^2 $$
But how is that useful? How can I calculate $W(J,\lambda)$ without having $Z$?
EDIT: If you don't know the book, the "baby problem" is the integral
$$ Z(J) = \int_{-\infty}^{+\infty}dq e^{-\frac 12m^2q^2-\frac{\lambda}{4!}q^4+Jq} $$
This is then expanded in $J$ terms, which yields integrals that can be solved using Wick's theorem. The result is a double series in $\lambda$ and $J$ with coefficients
$$ Z(J^{2a}, \lambda^b) = \frac{(2a+4b-1)!!}{b!(2a)!(4!)^b} \frac{1}{m^{2a+4b}}(-\lambda)^b J^{2a} $$