I have a set of products and each product has a set of reviews. Each review has one digit, I would need more of the average score, then I would need a real review of what precomputing on average and it has any best practice / clean methods of storage with hibernate.
I am currently thinking of manipulating the review method of adding the review calculation and adding to the equivalent columns in the product table and updating the update calculation and yoga
me It will be very happy to hear this in a cleaner manner.
I would recommend placing a mismatched column on your parent table if two competitor requests amount column If you try to update, no one will fail or you risk to clone the amount to read randomly (unless there is not much traffic in the system ...).
It is quite simple and any decent db should give good performance for a while (lazy psuedo sql / hkl):
1) Special average score for a product: / P>
select counts (points) / reviews where product_id =? 2) List of products and their average review score
Choose product name, yoga (r.score) / count (r.score) products Join Product Group by product_name , make sure that you have some sort of index on product_id on the review table.
By using Hibernate, you can use the launch question either through HQL or If this does not take long, I see.
Ensure that Hibernation is just killing the database once and to ensure that your cache is invalid when your item is updated / updated, show_sql And TestTestTest on.
Comments
Post a Comment