When we have a metal and a non-metal we have an ionic compound.
Metal + Non-Metal = Ionic Compound
If we have a metal and a polyatomic ion it is called Ternary Ionic.