We have a navigation menu that should contain the number of specific items after the section name. In addition, each user of the system has a different quantity value. The closest analogy I can do for this is the user's inbox and mailbox folders with a counter in brackets next to the folder name.
inbox (113)
sent (45)
MyFolder (161)
etc....
My question is that the navigation bar is displayed on every page. I tend to store the account value for each folder for the user in a separate table, but I know that this is considered bad practice (for example, normalizing the table). The cost of compiling a request is now small, but the database will grow. Is a database query every time a query is requested (using aggregates) the best practice?
source
share