What database should I use to store a large number of potentially large nested hash structures?

I want to store a large number (from hundreds of millions to hundreds of billions) of randomly nested hash structures (usually 4-6 levels), with some attributes at the top level. I do not need to query inside the nested hash, only on top-level attributes. The request should be possible without writing code, as a rule, for exact matches of top-level attributes. When updating records, I would like to be able to update only part of the sub-hash structures that have changed and should not read / write the entire record. Db must have bindings / drivers for C, Ruby, and Python.

Mongodb would seem to be ideal, except that on individual elements there was a 4 MB limitation (and should soon be 8 MB or 16 MB). Most of these items will be small, but some may be 100-200 MB or potentially more.

Is there any other database that meets these criteria?

+3
source share
2 answers

Redis does not meet many of your stated requirements, but maybe if you want to build something on top of it.

Two basic things are missing.

, Redis . - , . . . C, Ruby Python. .

-, , . . .

0

-. "id" , , - ... :

:

x => #<Company id: 16, name: "JRapid", markets: {"markets"=>"[{:market_id=>12, :market_name=>\"enterprise software\", :parents=>[{:parent_id=>12, :name=>\"enterprise software\", :grandparents=>{:parent_id=>12, :name=>\"enterprise software\"}}]}, {:market_id=>38, :market_name=>\"cloud computing\", :parents=>[{:parent_id=>38, :name=>\"cloud computing\", :grandparents=>{:parent_id=>38, :name=>\"cloud computing\"}}]}, {:market_id=>409, :market_name=>\"development platforms\", :parents=>[{:parent_id=>409, :name=>\"development platforms\", :grandparents=>{:parent_id=>409, :name=>\"development platforms\"}}]}, {:market_id=>1132, :market_name=>\"developer tools\", :parents=>[{}]}]"}, locations: {"locations"=>"[{:location_id=>1624, :location_name=>\"california\", :parents=>[{}]}, {:location_id=>1703, :location_name=>\"sunnyvale\", :parents=>[{}]}]"}, follower_count: 8, high_concept: "Rapid development Java cloud platform", product_desc: "JRapid is a Platform as a Service and is the fastes...", urls: {"blog_url"=>"http://www.jrapid.com/blog", "logo_url"=>"https://angel.co/images/icons/startup-nopic.png", "thumb_url"=>"https://angel.co/images/icons/startup-nopic.png", "company_url"=>"http://www.jrapid.com", "twitter_url"=>"http://www.twitter.com/JRapid", "angellist_url"=>"https://angel.co/jrapid"}, status: nil, created_at_or_updated_at: {"created_at"=>"2010-07-21T18:48:32Z", "updated_at"=>"2011-05-07T20:00:37Z"}, screenshots: {"screenshots"=>"[[nil]]"}, created_at: "2012-08-07 05:37:54", updated_at: "2012-08-07 05:37:54">

- :

x = x.locations
x = x['locations']
x = eval(x)
x[0][:id]
 #=> 1624

: eval() . , " ". . , - Document-DB. : ! eval !

( , , - SO, , )

0

Source: https://habr.com/ru/post/1790600/