Designing Your Buckets
ctulek at gmail.com
Fri Oct 15 17:01:39 EDT 2010
Thanks for the replies, I'll read the blogs.
On Fri, Oct 15, 2010 at 6:31 AM, Alexander Sicular <siculars at gmail.com>wrote:
> 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>
> 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>
> 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>
>> 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 index
>> > 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
>> > links to a ZipCodes bucket with further links to the People bucket. This
>> > 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
>> > 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>
>> ctulek at gmail.com> 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
>> >> 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
>> >> 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
>> >> 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/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>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