Relationships play a very important role in studies on quantitative genetics. In traditional breeding, pedigree records are used to establish relationships between animals; while this kind of relationship actually represents one kind of relatedness, it cannot distinguish individual specificity, capture the variation between individuals or determine the actual genetic superiority of an animal. However, with the popularization of high-throughput genotypes, assessments of relationships among animals based on genomic information could be a better option. In this study, we compared the relationships between animals based on pedigree and genomic information from two pig breeding herds with different genetic backgrounds and a simulated dataset. Two different methods were implemented to calculate genomic relationship coefficients and genomic kinship coefficients, respectively. Our results show that, for the same kind of relative, the average genomic relationship coefficients (G matrix) were very close to the pedigree relationship coefficients (A matrix), and on average, the corresponding values were halved in genomic kinship coefficients (K matrix). However, the genomic relationship yielded a larger variation than the pedigree relationship, and the latter was similar to that expected for one relative with no or little variation. Two genomic relationship coefficients were highly correlated, for farm1, farm2 and simulated data, and the correlations for the parent-offspring, full-sib and half-sib were 0.95, 0.90 and 0.85; 0.93, 0.96 and 0.89; and 0.52, 0.85 and 0.77, respectively. When the inbreeding coefficient was measured, the genomic information also yielded a higher inbreeding coefficient and a larger variation than that yielded by the pedigree information. For the two genetically divergent Large White populations, the pedigree relationship coefficients between the individuals were 0, and 62 310 and 175 271 animal pairs in the G matrix and K matrix were greater than 0. Our results demonstrated that genomic information outperformed the pedigree information; it can more accurately reflect the relationships and capture the variation that is not detected by pedigree. This information is very helpful in the estimation of genomic breeding values or gene mapping. In addition, genomic information is useful for pedigree correction. Further, our findings also indicate that genomic information can establish the genetic connection between different groups with different genetic background. In addition, it can be used to provide a more accurate measurement of the inbreeding of an animal, which is very important for the assessment of a population structure and breeding plan. However, the approaches for measuring genomic relationships need further investigation.