  Aims. We present a detailed study of the Mg/Si and C/O ratios and their
importance in determining the mineralogy of planetary companions. Methods.
Using 499 solar-like stars from the HARPS sample, we determine C/O and Mg/Si
elemental abundance ratios to study the nature of the possible planets formed.
We separated the planetary population in low-mass planets ( < 30 $\rm
M_{\odot}$) and high-mass planets ( > 30 $\rm M_{\odot}$) to test for possible
relation with the mass. Results. We find a diversity of mineralogical ratios
that reveal the different kinds of planetary systems that can be formed, most
of them dissimilar to our solar system. The different values of the Mg/Si and
C/O ratios can determine different composition of planets formed. We found that
100\% of our planetary sample present C/O < 0.8. 86\% of stars with high-mass
companions present 0.8 > C/O > 0.4, while 14\% present C/O values lower than
0.4. Regarding Mg/Si, all stars with low-mass planetary companion showed values
between 1 and 2, while 85% of the high-mass companion sample does. The other
15\% showed Mg/Si values below 1. No stars with planets were found with Mg/Si >
2. Planet hosts with low-mass companions present C/O and Mg/Si ratios similar
to those found in the Sun, whereas stars with high-mass companions have lower
C/O.
