I think,......It will be better to maintain a table for the user and also a purchase table that is chained to the user table.(i.e) make the user table as primary and the purchase table as child. Using primary and foreign keys link the tables. If a user purchase a product just update the purchase...