2
donuts
3y

Is there a portable DB format like sqlite but stores data like Mongo.

Each record contains key value pairs.

I guess I could install Mongo again... But kinda want to play with the data first. Pulls from a web api

I guess other alternative is to just save the json responses to disk in separate folders and files for now...

And abstract the DB layer behind an interface

Comments
  • 3
    There are many.
    Look at leveldb, or variants. I used it for a Android app a few yeara ago, and it out performed sqlite.
  • 0
    @magicMirror hm.... C.... I guess could try compiling and then importing as a library in C#....

    Never used C before.

    Just found this thread thiugh.... Not sure how I missed it before... But yea the term im looking for I guess was NOSQL...

    https://reddit.com/r/csharp/...
  • 1
    @magicMirror https://www.litedb.org/

    This kind nice. Nuget package too.
  • 2
    @donuts Looks nice.
    NoSql is good if you keep a single document per presentation with UI level filtering. Just do without data search ability, or complicated collection joins.
  • 0
    @magicMirror actually in the end I went with option 2... Just writing and reading json files to folders...

    The DB somehow doesn't map Dictionary<string,object> properly...

    Saves the keys but most of the time sets all the values to null...

    Though now thinking about it could be because those values are JElements (used JSON NET) rather then actual primitives like int, string ...

    But eh... hack faster...
  • 0
    @donuts
    Maybe use json serilazation lib?
    Then store as blob/text.
    Adds a bit of overhead, but should be fine for a small/mid level data loads.
Add Comment