Based on my experience, you're on the right track. In addition to your main 'entity' buckets, you'll want to create index buckets that you use to speed lookups and create links back to the entity buckets.
e.g. If you have a People bucket that is a nested record for a person with a mailing address, you might want to create some kind of States bucket with links to a ZipCodes bucket with further links to the People bucket. This way you can do link traversal from a state -> zip code -> person. To perform aggregations, you can use MapReduce. Using buckets and link walking can make it very easy to perform operations that closely mimic index seeks. Someone correct me if I've gone completely off the deep end on this one :) Jeremiah Peschka Microsoft SQL Server MVP MCITP: Database Developer, DBA 614.515.0727 On Fri, Oct 15, 2010 at 1:49 AM, Cagdas Tulek <[email protected]> wrote: > Hi, > > I'm a newbie to Riak (and riak like databases) and unfortunately I am a > long time RDB user. So, my mind is very biased but I try to think > differently and this will take some time. > > What I understand is that you try to avoid range queries and map/reduce > operations for live traffic. This part, I guess I understand better. > > However, one thing that I don't understand is the needs on admin side. > Although on frontend you can play smart to limit the objects that a user > should interact, on the admin side you usually want to list all records and > usually you want them to be sorted by id or creation time. These are also > true for your stats etc. > > How do you design your buckets in Riak to solve this problem? Or do you use > different approaches on admin side. > > One (maybe dirty) solution with my RDB biased mind is to have auxiliary > buckets to list items: > books/book1..n > lists/list1..n > where list-i is an array of x keys (where x is a small number like 10, 20). > This way we can have features like pagination. Same thing maybe for days: > days/20101014 > > I try to find slides/documents about these topics but usually the > information I find is about dealing with individual items and their > relations, not a list of these items. > > I would appreciate any resources addressing these problems. > > Best, > > Cagdas > > > _______________________________________________ > riak-users mailing list > [email protected] > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com > >
_______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
