I believe that designing the hardware is not the most difficult task for this project. It will be the selection of materials to add to the database. Being realistic, you cannot add every single meat, fruit, drink, food, cheese, oil, animal, vegetable, stone, liquid, drug, pill, etc, etc, etc over this world.
If we scan a material not included in your database, we won’t get a match. So how and who decides what to add? I’m thinking about a device that involves scanning pills, drinks, fruits, and nutritional complements. However it as affected by nations, mores, legality, distribution, accessibility, regulations, approval, etc.