The entire system is complete wizardry to me. The laser itself is witchcraft but the most amazing part is the database. I could imagine that stores somehow associate a code with a product when they add it to their inventory system but what prevents two manufacturers from using the same bar codes on different products. Is there a master database somewhere and who is responsible for managing it?
Edit: I really appreciate all the answers about the database aspect of this but I am still wondering how the actual laser works. Seems like it has to be fairly simple because the technology has been around for decades, long before ‘modern’ computers.