Results 1 to 6 of 6

Thread: C# Data Storage Help

  1. #1

    Join Date
    Oct 2012
    Gender
    Posts
    201
    Thanks
    11
    Thanked 87 Times in 50 Posts


    Downloads
    18
    Uploads
    0
    Mentioned
    30 Post(s)
    Time Online
    5 d 9 h 44 m
    Avg. Time Online
    4 m
    Rep Power
    6

    Exclamation C# Data Storage Help

    So I'm writing an app, let's call it for instance "Neopets Item Informer" which contains all the information of all items in the game, which a person can download and run.

    What is the best way to store this info?

    I want all the advantages of quick simple searching like SQL.
    I don't really want people to be able to simply steal my DB.
    The dataset will have about 30,000 - 40,000 records.

    What would also be great is if the db could be embedded in the exe file. In which case I'm not too worried about the inability to write to the file.


    What would you guys recommend as the best method?

    P.S. The program I'm making is not the one I described, but is pretty similar in all functionality.
    Last edited by Celestial; 05-06-2013 at 12:32 AM.

  2. #2
    Little Brother


    Zachafer's Avatar
    Join Date
    Dec 2011
    Gender
    Posts
    1,206
    Thanks
    723
    Thanked 1,392 Times in 651 Posts


    Downloads
    81
    Uploads
    17
    Mentioned
    497 Post(s)
    Time Online
    21 d 17 h 32 m
    Avg. Time Online
    16 m
    Rep Power
    14
    If you are ok with hosting it on localhost, I'd recommend SQLite. There is a complete C# port or .NET wrappers for SQLite. Embedding the database into the .exe / anywhere localhost is going to increase the download size significantly.

    If you don't want your database stolen, you can't store it locally, bottom line. If security is a huge concern, I'd recommend hosting your database somewhere (mySQL).

    Personally if I was building a complete item database I'd use MySQL with phpMyAdmin.

    My two cents.

  3. #3

    Join Date
    Oct 2012
    Gender
    Posts
    201
    Thanks
    11
    Thanked 87 Times in 50 Posts


    Downloads
    18
    Uploads
    0
    Mentioned
    30 Post(s)
    Time Online
    5 d 9 h 44 m
    Avg. Time Online
    4 m
    Rep Power
    6
    Quote Originally Posted by Zachafer View Post
    If you are ok with hosting it on localhost, I'd recommend SQLite. There is a complete C# port or .NET wrappers for SQLite. Embedding the database into the .exe / anywhere localhost is going to increase the download size significantly.

    If you don't want your database stolen, you can't store it locally, bottom line. If security is a huge concern, I'd recommend hosting your database somewhere (mySQL).

    Personally if I was building a complete item database I'd use MySQL with phpMyAdmin.

    My two cents.
    The privacy is only a moderate concern, I just don't want to make it TOO easy. More importantly I don't want to waste lots of time worrying about too much and I don't want the app to need to rely on a server-based database.

    I don't care about the size of the download, the entire db is about 10mb before compression and removal of unwanted info.

    Not done a lot of work with MS stuff, I find their documentation severely lacking.

  4. #4
    Little Brother


    Zachafer's Avatar
    Join Date
    Dec 2011
    Gender
    Posts
    1,206
    Thanks
    723
    Thanked 1,392 Times in 651 Posts


    Downloads
    81
    Uploads
    17
    Mentioned
    497 Post(s)
    Time Online
    21 d 17 h 32 m
    Avg. Time Online
    16 m
    Rep Power
    14
    Quote Originally Posted by Celestial View Post
    The privacy is only a moderate concern, I just don't want to make it TOO easy. More importantly I don't want to waste lots of time worrying about too much and I don't want the app to need to rely on a server-based database.

    I don't care about the size of the download, the entire db is about 10mb before compression and removal of unwanted info.

    Not done a lot of work with MS stuff, I find their documentation severely lacking.
    Have you ever worked with serialization? More specifically I'd suggest reading XML Serialization http://msdn.microsoft.com/en-us/libr...code-snippet-1

    I'd imagine the XML organization style would be appealing to an item database

  5. #5

    Join Date
    Oct 2012
    Gender
    Posts
    201
    Thanks
    11
    Thanked 87 Times in 50 Posts


    Downloads
    18
    Uploads
    0
    Mentioned
    30 Post(s)
    Time Online
    5 d 9 h 44 m
    Avg. Time Online
    4 m
    Rep Power
    6
    Quote Originally Posted by Zachafer View Post
    Have you ever worked with serialization? More specifically I'd suggest reading XML Serialization http://msdn.microsoft.com/en-us/libr...code-snippet-1

    I'd imagine the XML organization style would be appealing to an item database
    I imagine that would make searching through the data (via multiple criteria) and ordering annoying?

  6. #6
    Little Brother


    Zachafer's Avatar
    Join Date
    Dec 2011
    Gender
    Posts
    1,206
    Thanks
    723
    Thanked 1,392 Times in 651 Posts


    Downloads
    81
    Uploads
    17
    Mentioned
    497 Post(s)
    Time Online
    21 d 17 h 32 m
    Avg. Time Online
    16 m
    Rep Power
    14
    Quote Originally Posted by Celestial View Post
    I imagine that would make searching through the data (via multiple criteria) and ordering annoying?
    Not too bad, you can use XPath

    But I'd suggest LINQ over XPath anyday.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •