Zee's Nutshell: Feynman diagrams "baby problem": Connected vs. Disconnected 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}
$$
 A: Zee's book is great but often it's not clear whether you're meant to understand something or not. I think that this is one of those places where he just says something without giving the proof. In this particular case, doing a concrete example won't help much because the results depends on the sum of all diagrams, so I'll outline the proof. The details of this derivation are given in pretty much every QFT textbook (except Zee's); Srednicki is a favorite of mine.
First, $(6)$ is just the definition of $W$. Since $e^W = Z(J)/Z(0)$ (suppresing the $\lambda$ dependence), it is given by the sum of all diagrams divided by the sum of all diagrams with no external legs. Now, when you have a disconnected diagram, it factors into the product of its connected subdiagrams. In your notation, the amplitude for $|8$ is just the amplitude for $|$ times the amplitude for $8$.
Now a magical thing happens. When you sum all diagrams (connected and disconnected) to get $Z$, you can sort of divide it into factors, where each factor is the sum of many copies of a single connected diagram. If you have $n$ copies you need to raise the diagram to the power $n$ and divide by $n!$ to account for normalization, so what ends up happening is that $Z$ is proportional to the exponential of the sum of all connected diagrams:
$$Z(J) \propto \exp(\sum_I C_I)$$
Where each $C_I$ is a connected diagram. Since $Z$ was also proportional to $e^W$, we get that $W$ is the sum of connected diagrams; this is the quantity we calculate when actually doing Feynman diagrams. This is because calculating observables amounts to taking functional derivatives of $Z$ with respect to $J$ and then setting $J=0$, which brings down factors of $W$.
By the way, Zee doesn't care about the proportionality constant but it makes sense to have $Z(0)=\langle 0 | 0\rangle = 1$; therefore, if we say $Z(J) = \exp(W(J))$ and omit vaccum diagrams from $W$, we get $Z(0)=1$.
