I like an idea of document oriented databases like CouchDB. I am looking for simple analog.
My requirements is just:
What I do not need is REST/HTTP interfaces (I will use it in-proc). Also I do not need all scalability stuff.
A very simple solution would be PStore from Ruby's Standard Library. It should meet almost all your requirements:
Example:
Insert data into 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 of the prices of all products:
store.transaction do
store['products'].map {|p| p[:price]}.inject {|sum, p| sum + p}
end
More information in this blog-post
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With