database - Aerospike: Something like relatation -
i should make site price comparisons in pure aerospike, then: products, combination products (a cpu related motherboards) , stores. ù products should relate stores, example product related 3 stores , each store has different price.
aerospike can me in this?
i thought might make relationship bins, not know if idea suggestions solve problem?
you can model many-to-one relationships otherwise spread on 2 tables in single aerospike set using complex types list , map. combination product can have 'components' bin list of map objects, each of them product. or can have 'components' list of product ids batch-read products based on ids in list.
however, can model many-to-many relationships in similar way rdbms, intersection table. not have join, can perform separate queries , rely on fact aerospike key-value , batch operations far faster rdbms.
so example can have store_products intersection table can keep id of store , of product. build secondary index on both store id , product id, , allows queries. if you're looking stores carrying product query, fetch store objects store table. if you're looking products in store query withe store_id=x , batch-read products.
i hope answers question.
Comments
Post a Comment