3

I am about to choose a database solution for my c# project:

  • to store simple configuration at first, bools, ints, paths etc.
  • to store lots of small text blocks in the future
  • probably to store small pictures in the future too

I need the database:

  • to be lightweight
  • to be embedded
  • to be created per each user
  • not to be used by more than one user at time
  • to be free or very cheap
  • transactions to be reliable
  • to be scalable
  • to be encrypted or at least masked

Initially I thought about some NoSQL, text databases but is it the correct path? How about SQLite or other solutions? Since the database must be embedded I shall probably choose from:

  • SQLite
  • SQL Server Compact
  • Firebird Embedded
  • Couchbase Lite
  • LiteDB

LiteDB has got it all: it's lightweight, modern, noSQL, scalable, encryption is out of the box and supports .NET Core. Couchbase needs Enterprise Edition for encryption and the other databases are SQL or/and obsolete.

Does LiteDB have any cons?

3
  • 1
    What does "scalable" mean for you? Is it 1 GB of data, 8 GB, 256 GB or 2 TB? Or is it for load distribution on 2 servers, 20 servers, 100 servers? Or is it 10 simultenous users, or 1000 users or 1.000.000 users at the same time? Jun 15, 2020 at 18:46
  • I hope you know about the CAP theorem. Can you tell which 2 of those 3 properties are important to you? By "reliable transactions" I would imply that consistency is one of them. Jun 15, 2020 at 18:50
  • The question has been edited. I think I'll go with LiteDB, what do You think about my choice?
    – WackyJohn
    Jun 16, 2020 at 9:17

2 Answers 2

1

Not sure if it would fit your requirements, and I hope it's not bad form to recommend something I have developed, but over the last few months I have been developing a simple, fast SQL database written in C#. By simple, I mean that avoided all complexities that I feel I don't need, such as NULL, and I have also tried to keep the source code simple and easy to understand, so anyone can easily add features they need ( it doesn't have encryption currently ). It's here: https://github.com/georgebarwood/Database

1
  • I hope it's not bad form to recommend something I have developed It's perfectly acceptable as long as you disclose that you've developed it (as you just did).
    – Alejandro
    Mar 8, 2022 at 15:47
0

I know this post is a few years old now but it came up when searching on Google so thought I would add a response to anyone else who stumbles across it and maybe has similar questions.

Full transparency, I work for MongoDB but I still think it is a great developer data platform to consider. MongoDB is performant, scalable, flexible schema (can apply a schema and validation if you wish) and can be deployed to multiple cloud providers (including the big 3 of AWS, Azure and GCP) with MongoDB Atlas. It has a variety of products including free visualisations of your data with Charts, full-text search, Vector Search, support for federating Data across data sources and much more! There are drivers for all the big languages including JavaScript, C#, Python, Java, Go, Rust, PHP, Ruby and more. Plus best of all, there is a free forever tier that you can use to try out MongoDB and you can have one per project so can try out as many project ideas as you want!

The Developer Center is a great place to start with lots of quick starts, tutorials and articles across a breadth of languages, frameworks and features!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.