First, let me clarify that this is NOT a question about making an MRU (Most Recently Used) list, but rather a ranked list of items showing the most popular item. For example, in an MRU scheme, the item you used last will appear at the top, but what I want is for the most used item at the top, regardless of which one was used last.
Ok, on to the nuts and bolts...
I have a program with multiple number fields. Beside all of them, I have some buttons that will store the most popular values, which the user can click on to add the value to the textbox. The reason I'm doing it this way, is because the application will be on a system where the less typing required, the better.
How do I attempt to store data for this? I can't just have one running list of values and rank based on number of uses, because each number field needs to have its own specific list of popular values. For example, a popular value of 48.125 for "Item Length", won't be applicable for "Item Quantity", because a quantity in my program needs to be an even number.
So any ideas on a structure for a database, registry entries, or text file storage? It's not really important where I store the data, if the end result is what I'm looking for.
You might be asking what I have tried. To be honest, since this mostly a concept I'm trying to figure out, I haven't made any databases worth mentioning, but I can explain how I was thinking. I could create a database with a new table for each different "category", i.e. "Item Quantity", "Item Length", etc. Then each table would need to contain a list of Values and a number indicating how many times it's been used (which would determine the popularity). Here's an example for the "Item Quantity" category:
But is this going about it the right way? Do I need to create new table for each category? In addition to being a bit cumbersome, what if I need to create a new category sometime down the road?
I know my question might be a bit specific only to my situation, but I'm not asking for code, rather concept. Hopefully this question will be able to benefit others as well. Thanks a lot for taking the time and feel free to ask questions if you need clarification!