Designing Your Buckets
siculars at gmail.com
Fri Oct 15 09:31:40 EDT 2010
Another thing to keep in mind is that an individual document has
higher overhead than a row in a table. If you think about all the
metadata that accompanies a document in riak you will notice that the
ratio of overhead to value is higher the smaller your value is, like
say two character state codes or 5 character zip codes.
@siculars on twitter
Sent from my iPhone
On Oct 15, 2010, at 9:20, Jeremiah Peschka
<jeremiah.peschka at gmail.com> wrote:
> And here are the posts in question, which I clearly need to re-read
> (thanks for the gentle reminder, Alexander
> And this video covers a tiny bit of schema design: http://vimeo.com/14275191
> I know what I'm doing with my afternoon.
> Jeremiah Peschka
> Microsoft SQL Server MVP
> MCITP: Database Developer, DBA
> On Fri, Oct 15, 2010 at 8:58 AM, Alexander Sicular
> <siculars at gmail.com> wrote:
> State > zip > person with links in between seems very normalized to
> me. Ya, you can do it, but I wouldn't. You in flat space now.
> Denormalize ftw.
> Sean Cribbs had a blog post on m/r'ing over some people and I have a
> post on using m/r to sort by date. Google will find em.
> On 2010-10-15, Jeremiah Peschka <jeremiah.peschka at gmail.com> wrote:
> > Based on my experience, you're on the right track.
> > In addition to your main 'entity' buckets, you'll want to create
> > buckets that you use to speed lookups and create links back to the
> > 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
> > 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 <ctulek at gmail.com>
> >> 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/
> >> operations for live traffic. This part, I guess I understand
> >> However, one thing that I don't understand is the needs on admin
> >> 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
> >> 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
> >> 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
> >> riak-users at lists.basho.com
> >> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
> Sent from my mobile device
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the riak-users