[HN Gopher] LiteDB: A .NET embedded NoSQL database ___________________________________________________________________ LiteDB: A .NET embedded NoSQL database Author : jermaustin1 Score : 47 points Date : 2022-11-07 20:56 UTC (2 hours ago) (HTM) web link (www.litedb.org) (TXT) w3m dump (www.litedb.org) | PaulWaldman wrote: | SQLite integrates nicely with .Net and EF Core. Would there be | any reason to use this over SQLite with a JSON field? | jermaustin1 wrote: | Saying a document database is the same as a JSON field is a bit | reductive. | | I think you chose this instead of MongoDB like you would chose | SQLite instead of MSSQL. The library is very similar to Mongo's | .Net library, so its almost a 1:1 code replacement. | quickthrower2 wrote: | I agree. The way I see it, a document DB (I have used | Firebase) has features that make it nicer to work with | documents. For example Firebase let's you query and index | based on the data within the "JSON" (in quotes because it is | not really represented in Firebase as JSON, but is close in | structure). | | Another thing is you might want the lack of features. I.e. | you want it so people don't do joins etc. Because you want | the team to use the same paradigm with local data as with | server hosted. I can think of reasons why. | nordsieck wrote: | > I think you chose this instead of MongoDB like you would | chose SQLite instead of MSSQL. The library is very similar to | Mongo's .Net library, so its almost a 1:1 code replacement. | | I guess it depends on what's important. | | Some people primarily care about the API. Other people focus | on the operational story. | jcmontx wrote: | Nice project. A couple questions: is it EF Core compatible? Can I | save the DB file/files to azure blob storage? | jbluepolarbear wrote: | I use LiteDB for a game state store and am able to store the | database as a gzipped blob. LiteDB allows using memory streams | for usage and doesn't require a file stream so you should be | able to use any data store to store your database blobs. | jermaustin1 wrote: | Do you have more information about your game and how you are | using LiteDB? | jermaustin1 wrote: | I just found it today, so I might not be the best to answer | this, but I doubt it is EF compatible at all as it is a | document database (like MongoDB). As for azure blob storage, a | quick google search shows a handful of libraries that | accomplish that. | WorldMaker wrote: | EF Core briefly had a (beta-level) MongoDB-compatible | provider. It wasn't very useful in practice, but EF Core | blogs every now and then talk about returning to document | database support as a possibility. | | I don't think I would use EF Core with a document database, | but I can understand the appeal in sharing models with EF | Core, and maybe even utilizing a shared "Change Tracker". | Unless you are doing your own things, most EF Core models | should be POCOs easily enough serializable to JSON to | directly use in your document DB, and EF Core contexts at | this point have an easy enough Change Tracker API to query | that you could possibly reuse it easily enough for a document | DB (though that is probably overkill because you don't need | per-property tracking at that point usually, just per- | document tracking). | fuzzy2 wrote: | When using an App Service, you can have it mount a Blob | Container or File Share. Dunno how well that works for a | database though. | mrleinad wrote: | Used it for a while in production along with Serilog, but ended | up ditching it. LiteDB Studio is not as useful as it could be, | and there were issues when accessing a shared database that I | couldn't solve. | fuzzy2 wrote: | Could you please elaborate on the shared access issues? Is this | about multiple processes using the same database? | | (I recently found LiteDB while researching log destinations.) ___________________________________________________________________ (page generated 2022-11-07 23:00 UTC)