> Unless it's individually serialized and they have a large database
They already have that large database, those purchases are all already tracked and associated with a customer (to the extent they can depending on context). If you buy something at a major retailer, you'll get a receipt with a transaction number on it, with all the items of course on the receipt; the retailers are usually permanently warehousing that data. The data is text and trivial and gets easier to store closer to active space every day that passes (as opposed to only keeping the huge piles of data on ice; you want it rapidly accessible if you need to always be able to check for any transaction in the past, eg in that scenario of past items coming into the store from who knows when).
They already have that large database, those purchases are all already tracked and associated with a customer (to the extent they can depending on context). If you buy something at a major retailer, you'll get a receipt with a transaction number on it, with all the items of course on the receipt; the retailers are usually permanently warehousing that data. The data is text and trivial and gets easier to store closer to active space every day that passes (as opposed to only keeping the huge piles of data on ice; you want it rapidly accessible if you need to always be able to check for any transaction in the past, eg in that scenario of past items coming into the store from who knows when).