When creating a web application that somehow displays a unique identifier for a repeating object (videos on YouTube or a section of a book on a site like mine), it would be better to use an identifier of the same length, such as a hash or a unique element key in database (1, 2, 3, etc.).
Besides a little disclosure that, in my opinion, is not significant, information about the internal components of your application, why is a hash better than just using a unique identifier?
In short: What is better to use as a public unique identifier - a hash value or a unique key from the database?
Change I reopen this question because Dmitry raised a good point so as not to bind naming to a specific property. Will such a binding prevent me from optimizing / normalizing the database in the future?
The platform uses php / python with ISAM / w MySQL.
source share