Language : Java
Project Type : Web (war application)
Requirement : Maintain a Data structure which can contain key and value pair
Description : We have a database table in which we have mapped key, value pair
E.g. I) - Like for Customer Information, Table Name: - Customer_Info
----------------------------------------------------
Key | Value
Customer_Name | ABC
Address | XYZ
continued....around 2000
We fetch customer information from data base and maintain it in a data structure. After that during use we fetch the value correspondent to key.
Till now we have chosen LinkedHashMap for maintaining key,value pair.
Problem:-
But I think here is some problem in data structure selection.
Please explain the two scenario if I choose
LinkedHashMap, HashMap or ConcurrentHashMap . Which Data Structure will be the appropriate ?
Case I - If I maintain 2000 key values data structure.
Case II- If I fetch random key from whole map from anywhere.
Requirement: -
We have to maintain cost of Execution, Efficiency and increase the productivity of product. Please assist us to choose best data structure.
All the suggestion will be highly appreciated.