This paper considers the techniques to distinguish normal star forming ( NSF ) galaxies and active galactic nuclei ( AGN ) hosts using optical spectra . The observational data base is a set of 20 000 galaxies extracted from the Sloan Digital Sky Survey , for which we have determined the emission line intensities after subtracting the stellar continuum obtained from spectral synthesis . Our analysis is based on photoionization models computed using the stellar ionizing radiation predicted by population synthesis codes ( essentially Starburst 99 ) and , for the AGNs , a broken power-law spectrum . We explain why , among the four classical emission line diagnostic diagrams , ( [ O iii ] /H \beta vs [ O ii ] /H \beta , [ O iii ] /H \beta vs [ N ii ] /H \alpha ( the BPT diagram ) , [ O iii ] /H \beta vs [ S ii ] /H \alpha , and [ O iii ] /H \beta vs [ O i ] /H \alpha ) , the BPT one works best . We show however , that none of these diagrams is efficient in detecting AGNs in metal poor galaxies , should such cases exist . We propose a new divisory line between “ pure ” NSF galaxies and AGN hosts : y = ( -30.787 + 1.1358 x + 0.27297 x ^ { 2 } ) { tanh } ( 5.7409 x ) -31.093 , where y = log ( [ O iii ] /H \beta ) , and x = log ( [ N ii ] /H \alpha ) . According to our models , the divisory line drawn empirically by Kauffmann et al . ( 2003 ) includes among NSF galaxies objects that may have an AGN contribution to H \beta of up to 3 % . The Kewley et al . ( 2001 ) line allows for an AGN contribution of roughly 20 % . About 20 % of the galaxies in our entire sample that can be represented in the BTP diagram are found between our divisory line and the Kauffmann et al . line , meaning that the local Universe contains a fair proportion of galaxies with very low level nuclear activity , in agreement with the statistics from observations of nuclei of nearby galaxies . We also show that a classification into NSF and AGN galaxies using only [ N ii ] /H \alpha is feasible and useful . Finally , we propose a new classification diagram , the DEW diagram , plotting D _ { n } ( 4000 ) vs max ( EW [ O ii ] , EW [ Ne iii ] ) . This diagram can be used with optical spectra for galaxies with redshifts up to z = 1.3 , meaning an important progress over classifications proposed up to now . Since the DEW diagram requires only a small range in wavelength , it can also be used at even larger redshifts in suitable atmospheric windows . It also has the advantage of not requiring stellar synthesis analysis to subtract the stars and of allowing one to see all the galaxies in the same diagram , including passive galaxies .