What is the relationship between MQL ID and database query ID?

I want to know how the ID queried by MQL (such as 29173.60000.53692.6427) are mapped to the ID stored in the database (such as 776201957). Some data queried through SQL do not have a primary key, which makes it difficult to compare data, and I am worried that the queried data may not be the same. thank you.