  The multiple zeta values (MZVs) have been studied extensively in recent
years. Currently there exist a few different types of $q$-analogs of the MZVs
($q$-MZVs) defined and studied by mathematicians and physicists. In this paper,
we give a uniform treatment of these $q$-MZVs by considering their double
shuffle relations (DBSFs) and duality relations. The main idea is a
modification and generalization of the one used by Castillo Medina et al. who
have considered the DBSFs of a special type of $q$-MZVs. We generalize their
method to a few other types of $q$-MZVs including the one defined by the author
in 2003. With different approach, Takeyama has already studied this type by
"regularization" and observed that there exist $\mathbb Q$-linear relations
which are not consequences of the DBSFs. He also discovered a new family of
relations which we call the duality relations in this paper. This deficiency of
DBSFs occurs among other types, too, so we generalize the duality relations to
all of these values and find that there are still some missing relations. This
leads to the most general type of $q$-MZVs together with a new kind of
relations called $\bf P$-$\bf Q$ relations which are used to lower the
deficiencies further. As an application, we will confirm a conjecture of
Okounkov on the dimensions of certain $q$-MZV spaces, either theoretically or
numerically, for the weight up to 12. Some relevant numerical data are provided
at the end.
