Ionic bonds occur between a metal and non-metal. In this type of bonding, the electrons in the outer shell are transferred from the metal to the non-metal. This is to allow the atoms to achieve a full outer shell of electrons. For example, when sodium chloride forms, sodium donates its one outer electron so that chlorine can achieve a full outer shell of 8 electrons. On the other hand metallic bonding occurs within metals. This is where the outer shell of electrons become delocalised (free to move around) in a sea of positive metal ions. For example, magnesium has 2 electrons in its outer shell. An electrostatic attraction forms between these delocalised electrons and the positive metal magnesium 2+ ions.