When we have a metal and a non-metal we have an ionic compound.
Metal + Non-Metal = Ionic Compound
If there are only two different types of elements it is called Binary Ionic.