Comparing the nature of ionic compounds
&quot;Strength&quot;. 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 &quot;ionic&quot; 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 &quot;bonds&quot; you get.
There are two main factors that affect the lattice formation enthalpy:

Charge of the ions
Radius 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 &quot;stable&quot; 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.

Radius of the ions:

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.
In your case:
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.
In case of additional study, you can visit:
http://www.chemguide.co.uk/physical/energetics/lattice.html
http://www.knockhardy.org.uk/sci_htm_files/08le.pdf
http://www.rsc.org/learn-chemistry/resources/gridlocks/downloads/answers/Born%20Haber%20NaCl%20ans.pdf

Addendum:
The charge and the radius of ions are by no means the only factors that affect the lattice enthalpy. It's just that the other factors are considered &quot;trivial&quot; by current textbooks.
The lattice enthalpy and lattice energy aren't the same. They do have close meanings, though.