Based on the normal-state electronic band structure, the necessary condition for a metal to become a superconductor is the simultaneous occurrence of flat and steep bands at the Fermi level. The sufficient condition at least for conventional superconductors is a strong enough coupling of the flat band states to the lattice, e.g. via phonons. Selected elements (Te) and compounds of the rare earth metals (
RE
2
C
3
,
REC
2
,
RE
2
X
2
C
2
with
X
=halogen) and MgB
2
serve as examples to illustrate the idea.