Hello,
I have a table in DB that contains the code for an action in the stock market, date and value of this action to date. I want a simple structure, with, if we consider a table, an action line. Style a table of 6 columns with the code share, the value today, the value of last month, the value. I immediately thought of a table, but is that what are faster in Java? Then I'll have to easily access the values of a share from its code. So I need some kind of index on the action code, that's why I thought of a Map. I tell myself I can do a Map containing the key code of the action and enhance an array of 5 values of my action:
Code:
MAP:
key | value
13244 | [4.0, 2.0, 7.44, 12, 74]
I can also replace the table with a Map, and have a Map of Map:
Code:
MAP:
key | value
13,245 | MAP (AUJ -> 5.0 yesterday -> 2.0, last month -> 7.45, ...-> 12 ...-> 74)
But I do not see the point. I think it's a problem that is often faced, having to store data from a database in a table or a Map and would like your opinion on my idea Map (key, table).
Bookmarks