Can I use a counter in a database Many-to-Many field to reduce lookups?
问题 I am trying to figure out the fastest way to access data stored in a junction object. The example below is analagous to my problem, but with a different context, because the actual dataset I am dealing with is somewhat unintuitive in its relationships. We have 3 classes: User , Product , and Rating . User has a many-to-many relationship to Product with Rating as the junction/'through' class. The Rating object stores the answers to several questions which are integer ratings on a scale of 1-5