Comparison of ionic and covalent bonds