Library search incorrect

Lenses are problematic because I believe they are a company product. EG I have lens 50. Used on camera body 1 it has an internal code and returns 50, but used on camera 2 it may return Dx50 … camera 3 50mm1.8 and so on. There is no consistent lens information because the same lens on different bodies will give different values…