We study the relation between the mass accretion rate, the jet power and the black hole mass of blazars. With this aim, we make use of the Sloan Digital Sky Survey and the 11-month catalogue of blazars detected at energies larger than 100 MeV by the Large Area Telescope onboard the Fermi satellite. This allows us to construct a relatively large sample of blazars with information about both the luminosity (or upper limits) of their emission lines (used as a proxy for the strength of the disc luminosity) and the luminosity of the high-energy emission (used as a proxy for the jet power). We find a good correlation between the luminosity of the broad lines and the γ-ray luminosities as detected by Fermi, both using the absolute values of the luminosities and normalizing them to the Eddington value. The data we have analysed confirm that the division of blazars into BL Lacertae objects (BL Lacs) and flat spectrum radio quasars (FSRQs) is controlled by the line luminosity in Eddington units. For small values of this ratio, the object is a BL Lac, while it is a FSRQ for large values. The transition appears to be smooth, but a much larger number of objects is needed to confirm this point.