The same words in dictionary + Serilization
-
Hello ! I had to do a Dictionary. So i began choosing how to keep the words. 1)
>>>>>>>>>>>>>>>>Data Type <<<<<<<<<<<<<<<<<<<<
The problem is that i have a lot of same words, but with different translations. The customer wants the words to be kept as they were given me. Sorted lists does not support the same keys. ArrayList is the best structure to keep the words, but it is working wery long (to load about 20000 words). 2)>>>>>>>>>>>>>>>>>>>>>Keeping on disk <<<<<<<<<<<<<<
I keep the words on disk using serialization (SOAP). Was i write? I checked, it was 5 times slower than StreamWrite/Read, but i don't have to worry about the length of my word and translation (+some comments). Should i left how it is, or use something else (+databases) Thanks for your attention.One nation - underground
-
Hello ! I had to do a Dictionary. So i began choosing how to keep the words. 1)
>>>>>>>>>>>>>>>>Data Type <<<<<<<<<<<<<<<<<<<<
The problem is that i have a lot of same words, but with different translations. The customer wants the words to be kept as they were given me. Sorted lists does not support the same keys. ArrayList is the best structure to keep the words, but it is working wery long (to load about 20000 words). 2)>>>>>>>>>>>>>>>>>>>>>Keeping on disk <<<<<<<<<<<<<<
I keep the words on disk using serialization (SOAP). Was i write? I checked, it was 5 times slower than StreamWrite/Read, but i don't have to worry about the length of my word and translation (+some comments). Should i left how it is, or use something else (+databases) Thanks for your attention.One nation - underground
First question: To solve your problem with of having the same word with multiple translations, the Dictionary key would be your "word" and the Dictionary value would be an ArrayList to store your translations of the corresponding key "word". Second question: If serialization is too slow, storage of your data in a database would be your best bet. Geo
"We make a living by what we get, we make a life by what we give." --Winston Churchill
-
First question: To solve your problem with of having the same word with multiple translations, the Dictionary key would be your "word" and the Dictionary value would be an ArrayList to store your translations of the corresponding key "word". Second question: If serialization is too slow, storage of your data in a database would be your best bet. Geo
"We make a living by what we get, we make a life by what we give." --Winston Churchill