Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. The same words in dictionary + Serilization

The same words in dictionary + Serilization

Scheduled Pinned Locked Moved C#
wcfsalesxmljsonhelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Saikek
    wrote on last edited by
    #1

    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

    G 1 Reply Last reply
    0
    • S Saikek

      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

      G Offline
      G Offline
      George L Jackson
      wrote on last edited by
      #2

      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

      S 1 Reply Last reply
      0
      • G George L Jackson

        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

        S Offline
        S Offline
        Saikek
        wrote on last edited by
        #3

        Thanks. I'm beginner in databases, what can you advise me to use or mayby read about it ?

        One nation - underground

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups