We perform a systematic analysis of the D-brane charges associated with
string theory realizations of d=3 gauge theories, focusing on the examples of
the N=4 supersymmetric U(N)xU(N+M) Yang-Mills theory and the N=3 supersymmetric
U(N)xU(N+M) Yang-Mills-Chern-Simons theory. We use both the brane construction
of these theories and their dual string theory backgrounds in the supergravity
approximation. In the N=4 case we generalize the previously known gravitational
duals to arbitrary values of the gauge couplings, and present a precise mapping
between the gravity and field theory parameters. In the N=3 case, which (for
some values of N and M) flows to an N=6 supersymmetric Chern-Simons-matter
theory in the IR, we argue that the careful analysis of the charges leads to a
shift in the value of the B-field in the IR solution by 1/2, in units where its
periodicity is one, compared to previous claims. We also suggest that the N=3
theories may exhibit, for some values of N and M, duality cascades similar to
those of the Klebanov-Strassler theory.Comment: 47 pages, 9 figures; minor changes, references adde