I love a concept of document oriented databases like CouchDB. I'm searching for simple analog.

My needs is simply:

  1. persistance storage for schema less data
  2. some simple in-proc quering
  3. good to possess transactions and versioning
  4. ruby API
  5. map/reduce is aslo good to possess
  6. should focus on hosting that is shared

What I don't require is Relaxation/HTTP connects (I'll utilize it in-proc). Also I don't need all scalability stuff.

A simple solution could be PStore from Ruby's Standard Library. It will meet just about all your needs:

  1. PStore stores Ruby object hierarchies in files, so that you can easily make use of the Hash-like structures, you'd have in CouchDB
  2. You have access to the items in the PStore having a simple API
  3. It's transactions, but no versions so far as I understand
  4. yes
  5. You should use Ruby's map and inject functions
  6. You just need accessibility file system

Example:

Place data in to the store:

require 'pstore'
store = PStore.new("/tmp/store")
store.transaction do
  store["products"] = [{:name => "Test", :price => 100}
                       {:name => "Bla", :price => 120}
                       {:name => "Oink", :price => 300}]
end

Query the sum prices of items:

store.transaction do
  store['products'].map {|p| p[:price]}.inject {|sum, p| sum + p}
end

More details within this blog-post

Seems like you'll need Berkeley DB. It will all you list aside from map/reduce.