Built-in analogue of CouchDB, same as sqlite for SQL Server

I like the idea of ​​document-oriented databases like CouchDB. I am looking for a simple analogue.

My requirements are fair:

  • persistance storage for less data schema;
  • some simple in-proc requests;
  • good to have transactions and version control;
  • ruby API;
  • map / reduce is just as good to have;
  • should work on shared hosting

I do not need REST / HTTP interfaces (I will use it in proc). Also, I do not need all the scalability features.

+5
source share
2 answers

PStore Ruby Standard Library. :

  • PStore Ruby , Hash, CouchDB
  • PStore API
  • , , ,
  • Ruby
  • , -

:

:

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

:

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

blog-post

+4

, Berkeley DB. , , /.

0

All Articles