Comparing the nature of ionic compounds

I want to know how to compare the strength or stability of ionic compounds. Example : $\ce{Mg(HCO3)2}$ and $\ce{NaHCO3}$

I know that polarity and polarizability affect the ionic and covalent nature.

"Strength". Hmm, what firstly comes to mind is you want a comparison of lattice energies (or more precisely, lattice enthalpies)

Lattice energy is a [crude] way of estimating how strong the electrostatic attractions are between ions in an ionic compound. Let's take the formation of $$\ce{NaCl}$$ into account, as I see it's the most common "ionic" compound that teachers start teaching the lesson with.

According to Born-Haber cycle this is the reaction that results in the formation of pure table salt: $$\ce{Na+(g) + Cl- (g) \rightarrow NaCl(s)}$$ Forming the salt crystals is exothermic and this is called the lattice enthalpy of formation.

Note that some textbooks mean to define lattice energy as the energy that is obtained by the thermodynamic system in the process of turning the solid compound to its gaseous ions.

To make a long story short, the more the lattice enthalpy is, the stronger "bonds" you get. There are two main factors that affect the lattice formation enthalpy:

• Charge of the ions

Charge of the ions:

Source

Look at the diagram above. $$\ce{NaCl}$$ is known to release approximately 822 kilojoules upon formation, while $$\ce{MgO}$$ releases 3890 KJ. And what does that mean? It means that Magnesium Oxide is way more "stable" than Sodium Chloride. So, complete the rest:

The more the charge of the ions is in an ionic compound, the _____ is its lattice enthalpy and the ______ its stability.

Source

As you see, and could've imagined if you were on the right track, bigger ions (literally) mean weaker attraction. I wanted the answer to be fairly complete, so I did an addition to the main point that answers your question. Thus, there's no need of expanding this.

You might as well have reached a conclusion. Mg ion has a 2+ charge, while Na has only a single electron missing. The anion is pretty much the same, $$\ce{HCO3-}$$ (hydrogen carbonate), and its priorly covalent nature shouldn't mislead you in doubting your answer. There is a case of comparison of the charge of the ions, and I would say Magnesium ion wins.