2

I've been searching for a document-oriented DB that for a Windows desktop program. MongoDB seems to be the best one so far, because it's smaller (11MB) and simpler when compared to CoachDB (which is another option but it seems to be more complex and the download size is almost 50MB), but unfortunately, on 32-bit Windows the database size limit in MongoDB is 2GB, and they don't intend to fix this limit anytime.

Do you have any recommendation? Requirements:

  1. Open source;
  2. schema-less, in BSON/JSON format;
  3. Easy to deploy to a windows machine.

Many thanks!

Edwin Yip
  • 4,089
  • 4
  • 40
  • 86

1 Answers1

1

I'm just curious.. Why would you need a non-relational database for a desktop application. I mean, these things are designed for high-availability clusters and a really large amount of data, both of which are irrelevant for desktop apps where you would usually have just one user at a time and not so large dataset.

What I would use if I were you is an embedded database like HSQLDB or SQLite.

Now, if you want make it schema-less for simplicity, well just create your tables only with columns id long and data varchar

And then serialize/deserialize your objects to and from JSON yourself when accessing the data.

You can see a really easy way to do the JSON stuff here:

JSON Serializer for arbitrary HashMaps in Voldemort

Note: The question on link above is Voldemort-specific, but the answer I received isn't and could be applied here as well (assuming you are using Java, if not there has to be an easy way to do so in your language, too).

Community
  • 1
  • 1
Goran Jovic
  • 9,418
  • 3
  • 43
  • 75
  • Thanks for the tips, why I need something like MongoDB is because it's perfect for storing objects in different schema (represented in JSON), and it supports advanced querying syntax base on the object properties, imagine I store an "email" objects and "contact" objects in the same DB, and even complex, I need to store objects of unknown formats. – Edwin Yip Dec 09 '10 at 03:55
  • And your solution with a relational database is good, but it's not possible to query using the object properties... – Edwin Yip Dec 09 '10 at 03:57
  • @Edwin: Yeah, I get it now. You definitely couldn't query this. – Goran Jovic Dec 09 '10 at 08:44