Sum or average using parallel lists?

I am relatively new to bubble and still struggling with an aspect of list management.
Here’s what I’d like to do:

Each user would have reviews of products grouped into categories created by the user. The list of products to be selected would be shared across users.

My understanding is that the most efficient way to store this would be to have a ‘category’ table, which has rows of categories and each contain a list of [products] and a list of [ratings]. So the categories table might look like:

[CategoryName] | [ProductName] |[ProductRating] =======================================
CategoryA | Product X, Product Y, Product Z | 2, 4, 3
CategoryB | Product Z, Product A, Product B | 1, 5, 2

In the above example, is there a way to run a search for Product Z, and then pull the corresponding ratings for Product Z so that I can show an average Product Z rating?
Or is the better way to do this to have a table of ‘Ratings’ where each row contains a single product, a single rating, and a link to the appropriate category? This latter option seems quite easy, but feels like it will slow things down. If I go with the list method, I could essentially set this up like a shopping cart (add products to a cart to rate, and then instead of changing the quantity, change a rating, and then add them all into a table in one go). I understand that would make it super responsive, but I can’t figure out how to aggregate/average ratings across categories and users if the product and ratings are in parallel lists.

Thanks for any guidance. I’ve been searching through the forums and haven’t quite found the right answer, so also appreciate pointing me in the right direction if this is asked and answered already.