I have a database table with 600 rows, that looks something like this
[ These Are Natural Key ]
Car Part MyDescription
char(64) char(64) char(256)
--- ---- ------------------------------------
Honda Tire Looks like a donut, but not as tasty
Honda Wheel Shiny and wears a rubber shoe
Ford Engine Eats gas and makes loud noise.
Chevy Tire Donutish but not for a Honda.
It's not actually car parts of course.
I need to load the entire 600 rows into memory when the user starts their app. Frequently other classes will need to return a single Description (Field3) FAST when given a Cart.Part (Field1, Field2) composite natural key. Nothing else, no sorting, lists, updating, for-each loops, just speed.
Many times in the code I'd like to do retrieve the Description (Field3) roughly like this?
string MyDescription = MyNewExpertclass.Get("Hond
I'm a database guy mostly. It seems a Hash Table would be perfect since I know the size beforehand and don't need to update, order or loop through the data.
Singleton doesn't seem correct, but maybe a static object containing the hash table so that it is loaded once and accessed many times throughout the application code?