Synthesis and characterization of calcium and magnesium based oxides and titanates for photocatalytic degradation of rhodamine B: a comparative study