> how do we make this definition of limit yield the notion of a product (which I understand is a kind of limit)

Let's see what happens when we set \$$\mathcal{D} = \textrm{2}\$$ (the category with two discrete objects).

A \$$\textrm{2}\$$-database is a functor \$$H : \textrm{2} \rightarrow \textbf{Set}\$$, ie an ordered pair of sets \$$\langle A, B \rangle\$$.

There's a unique map \$$! : \textrm{2} \rightarrow \textrm{1}\$$.

A \$$\textrm{1}\$$-database is a functor \$$F : \textrm{1} \rightarrow \textbf{Set}\$$, ie a single set \$$X\$$.

Given any \$$F\$$ we can precompose with \$$!\$$ to get a \$$\textrm{2}\$$-database \$$F \circ !\$$.

This is the diagonal pair \$$\langle X, X \rangle\$$.

The right Kan extension is the right adjoint to the functor \$$F \mapsto F \circ !\$$.

It sends \$$\textrm{2}\$$-databases to \$$\textrm{1}\$$-databases, so the pair of sets \$$\langle A, B \rangle\$$ is sent to a single set \$$P\$$.

Given any \$$F\$$, \$$H\$$ we have \$$\textrm{Nat}[F \circ !, H] \cong \textrm{Nat}[F, \textrm{Ran}_!(H)]\$$.

ie natural transformations from \$$F \circ !\$$ to \$$H\$$ correspond bijectively to natural transformations from \$$F\$$ to \$$\textrm{Ran}_!(H)\$$.

ie pairs of maps \$$a : X \rightarrow A\$$, \$$b : X \rightarrow B\$$ correspond to single maps \$$k : X \rightarrow P\$$.

In particular we can set \$$F = \textrm{Ran}_!(H)\$$, ie \$$X = P\$$, and get a pair of maps \$$p : P \rightarrow A\$$, \$$q : P \rightarrow B\$$ corresponding to the identity \$$e : P \rightarrow P\$$.

By naturality in \$$F\$$ the composites \$$p \circ k : X \rightarrow P \rightarrow A\$$ and \$$q \circ k : X \rightarrow P \rightarrow B\$$ correspond to \$$e \circ k : X \rightarrow P \rightarrow P = k : X \rightarrow P\$$.

And since the correspondence is bijective we must have \$$a = p \circ k\$$ and \$$b = q \circ k\$$.

Bijectivity also tells us that \$$p \circ k' = p \circ k\$$ and \$$q \circ k' = q \circ k\$$ implies \$$e \circ k' = e \circ k\$$, ie \$$k' = k\$$.

In other words, for any pair of maps \$$a : X \rightarrow A\$$, \$$b : X \rightarrow B\$$ there is a unique map \$$k : X \rightarrow P\$$ such that \$$a = p \circ k\$$ and \$$b = q \circ k\$$.

ie \$$P\$$ is product of \$$A\$$ and \$$B\$$, with projection maps \$$p\$$ and \$$q\$$.