Ionic bonding and properties of ionic compounds