20

I'm looking for a document-oriented db with a Ruby API that has SQLite-like properties:

  • self-contained,
  • serverless,
  • zero-configuration.

Are there light alternatives to MongoDB or CouchDB?

Is RDDB a possibility?

If not, what are the best paths to walk then?

Community
  • 1
  • 1
davidbe
  • 840
  • 1
  • 6
  • 16
  • 1
    I just started looking at MongoDB and the first thing I thought was, I wish this was split like Tokyo Cabinet and Tokyo Tyrant into a database portion and the network side. Maybe it is and I haven't found it yet. I've also be thinking about trying to use SQLite and Lua to create a sort of document-oriented db. – uroc Feb 23 '10 at 16:18
  • What OS? Windows, Linux, IPhone....? – Theo Feb 24 '10 at 12:32
  • I guess I can conclude that there isn't an alternative -- though some ideas are nice. – davidbe Mar 02 '10 at 11:47

4 Answers4

8

I know, the question was asked 5 years ago, but just for completeness' sake, embedded MongoDB has happened since:

https://github.com/hamiltop/MongoLiteDB

Hans Meiser
  • 256
  • 3
  • 11
4

It's not ready yet, but embeddable version of CouchDB are on the long term roadmap.

Replication is intended to enable offline applications with CouchDB. If you ended up with very specific needs you could replicate data from couchdb to a local datastructure, store it locally, update it, and push the data back via replication but it would take some code.

mikeal
  • 4,037
  • 2
  • 27
  • 22
2

If you were using Perl, I'd recommend DBM::Deep, which stores arbitrary data structures on disk, including transactions with commit/rollback, and it's a non-C one-Perl-module install. Doesn't get much lighter than that.

Randal Schwartz
  • 39,428
  • 4
  • 43
  • 70
1

I almost feel you could do some sort of hack to achieve this.

Have a table using sqlite's row ids along with a field for collection name and text blob that would be json code.

Have another table for indexing with fields in a collection (collection name, field name, field value, document row id).

You could do some wrapper class to handle things like updates and lookups. Would be interesting.

RobKohr
  • 6,611
  • 7
  • 48
  • 69