Will this reaction form magnesium carbonate? I have magnesium oxide pills I take. I know if I dissolve them they'll form magnesium hydroxide, and I'm trying to make pure magnesium from my pills. I've come up with a double replacement reaction, will it do what I think it will?

$$\ce{Na2CO3(aq) + Mg(OH)2(aq) -&gt; MgCO3(s) + 2NaOH(aq)}$$

Will this precipitate out magnesium carbonate?

Another thing: I was planning on using electrolysis to separate the magnesium, but if it's insoluble then I'm not sure what to do. How can I separate the magnesium from the carbonate?
If such a reaction takes place at all it is not very efficient because magnesium hydroxide is not very soluble.

And if you want to get the metallic magnesium neither the carbonate nor the hydroxide will really work.  Both decompose at a relatively low temperature to the oxide, which is then solid up to $\pu{2800\!^\circ C}$.  Convert the magnesium to the chloride and melt that, preferably as a eutectic with alkali metal chlorides.  Then electrolyze the molten salt.  An aqueous solution of magnesium chloride  (or anything else containing magnesium) does not work.