You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Syg raf <sy...@gmail.com> on 2011/10/10 07:25:55 UTC

basic question for newbie

Hello folks,

I'm just starting with HBase and have a couple of rudimentary questions
about how to use it:

I have a simple Java program that have been developer for the purpose of
learning HBase, the program was built with MySQL as  database, it contain 3
tables: Authors, Books and AuthorBook (for the N to N relation).
I am wondering if someone can help me to do the same with HBase, what could
the schema be?
Any recommendations are welcome and just keep in mind that I'm just
beginning, simple explanation would be great.

Thanks a lot,
Sygura.

Re: basic question for newbie

Posted by Li Pi <lp...@ucsd.edu>.
Assuming you want this to be done in constant time:

You'd have a Author table and a Book table. For the author table, the
key would be the name of the author, and the value would be the book.

For the book table, the key would be the name of the book, and the
value would be the author.

This will allow you constant time lookups of any book/author.

On Sun, Oct 9, 2011 at 11:35 PM, Syg raf <sy...@gmail.com> wrote:
> I want to be able to get an author or a book and also, i want to be able to
> get all the authors of a book and all the books of an author (N to N
> relation in SQL db). Does that give you enough information?
>
> Thanks
> On Mon, Oct 10, 2011 at 2:16 AM, Sonal Goyal <so...@gmail.com> wrote:
>
>> How do you want to query your data? This question decides how you can save
>> your data.
>>
>> Best Regards,
>> Sonal
>> Crux: Reporting for HBase <https://github.com/sonalgoyal/crux>
>> Nube Technologies <http://www.nubetech.co>
>>
>> <http://in.linkedin.com/in/sonalgoyal>
>>
>>
>>
>>
>>
>> On Mon, Oct 10, 2011 at 11:17 AM, Syg raf <sy...@gmail.com> wrote:
>>
>> > Thanks Sam for the link, I'm going to get the book ordered.
>> >
>> > Just to start and get familliar with HBase, can yo tell if everything go
>> > into one table and the data separated into column families? if not, based
>> > on
>> > what we create multiple tables ?
>> >
>> > Thanks
>> >
>> > On Mon, Oct 10, 2011 at 1:28 AM, Sam Seigal <se...@yahoo.com> wrote:
>> >
>> > > Start off with the HBase book, great resource for getting started:
>> > >
>> > > http://ofps.oreilly.com/titles/9781449396107/
>> > >
>> > >
>> > > On Sun, Oct 9, 2011 at 10:25 PM, Syg raf <sy...@gmail.com> wrote:
>> > >
>> > > > Hello folks,
>> > > >
>> > > > I'm just starting with HBase and have a couple of rudimentary
>> questions
>> > > > about how to use it:
>> > > >
>> > > > I have a simple Java program that have been developer for the purpose
>> > of
>> > > > learning HBase, the program was built with MySQL as  database, it
>> > contain
>> > > 3
>> > > > tables: Authors, Books and AuthorBook (for the N to N relation).
>> > > > I am wondering if someone can help me to do the same with HBase, what
>> > > could
>> > > > the schema be?
>> > > > Any recommendations are welcome and just keep in mind that I'm just
>> > > > beginning, simple explanation would be great.
>> > > >
>> > > > Thanks a lot,
>> > > > Sygura.
>> > > >
>> > >
>> >
>>
>

Re: basic question for newbie

Posted by Syg raf <sy...@gmail.com>.
Thank you very much all of you.
With all this suggestion, i have enough information to get going with my
first HBase implementation.

Regards,
Sygura
---
On Mon, Oct 10, 2011 at 9:01 AM, Doug Meil <do...@explorysmedical.com>wrote:

>
> You'll want to review this too...
>
> http://hbase.apache.org/book.html#schema
>
>
>
>
>
> On 10/10/11 2:51 AM, "Sonal Goyal" <so...@gmail.com> wrote:
>
> >One possible schema for your case could be:
> >
> >rowkey: book. Column familty: author, qualifiers one, two, three...
> >AND similar table for authors
> >rowkey: author, Column family books
> >
> >Best Regards,
> >Sonal
> >Crux: Reporting for HBase <https://github.com/sonalgoyal/crux>
> >Nube Technologies <http://www.nubetech.co>
> >
> ><http://in.linkedin.com/in/sonalgoyal>
> >
> >
> >
> >
> >
> >On Mon, Oct 10, 2011 at 12:05 PM, Syg raf <sy...@gmail.com> wrote:
> >
> >> I want to be able to get an author or a book and also, i want to be
> >>able to
> >> get all the authors of a book and all the books of an author (N to N
> >> relation in SQL db). Does that give you enough information?
> >>
> >> Thanks
> >> On Mon, Oct 10, 2011 at 2:16 AM, Sonal Goyal <so...@gmail.com>
> >> wrote:
> >>
> >> > How do you want to query your data? This question decides how you can
> >> save
> >> > your data.
> >> >
> >> > Best Regards,
> >> > Sonal
> >> > Crux: Reporting for HBase <https://github.com/sonalgoyal/crux>
> >> > Nube Technologies <http://www.nubetech.co>
> >> >
> >> > <http://in.linkedin.com/in/sonalgoyal>
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > On Mon, Oct 10, 2011 at 11:17 AM, Syg raf <sy...@gmail.com>
> >>wrote:
> >> >
> >> > > Thanks Sam for the link, I'm going to get the book ordered.
> >> > >
> >> > > Just to start and get familliar with HBase, can yo tell if
> >>everything
> >> go
> >> > > into one table and the data separated into column families? if not,
> >> based
> >> > > on
> >> > > what we create multiple tables ?
> >> > >
> >> > > Thanks
> >> > >
> >> > > On Mon, Oct 10, 2011 at 1:28 AM, Sam Seigal <se...@yahoo.com>
> >> wrote:
> >> > >
> >> > > > Start off with the HBase book, great resource for getting started:
> >> > > >
> >> > > > http://ofps.oreilly.com/titles/9781449396107/
> >> > > >
> >> > > >
> >> > > > On Sun, Oct 9, 2011 at 10:25 PM, Syg raf <sy...@gmail.com>
> >> wrote:
> >> > > >
> >> > > > > Hello folks,
> >> > > > >
> >> > > > > I'm just starting with HBase and have a couple of rudimentary
> >> > questions
> >> > > > > about how to use it:
> >> > > > >
> >> > > > > I have a simple Java program that have been developer for the
> >> purpose
> >> > > of
> >> > > > > learning HBase, the program was built with MySQL as  database,
> >>it
> >> > > contain
> >> > > > 3
> >> > > > > tables: Authors, Books and AuthorBook (for the N to N relation).
> >> > > > > I am wondering if someone can help me to do the same with HBase,
> >> what
> >> > > > could
> >> > > > > the schema be?
> >> > > > > Any recommendations are welcome and just keep in mind that I'm
> >>just
> >> > > > > beginning, simple explanation would be great.
> >> > > > >
> >> > > > > Thanks a lot,
> >> > > > > Sygura.
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
>
>

Re: basic question for newbie

Posted by Doug Meil <do...@explorysmedical.com>.
You'll want to review this too...

http://hbase.apache.org/book.html#schema





On 10/10/11 2:51 AM, "Sonal Goyal" <so...@gmail.com> wrote:

>One possible schema for your case could be:
>
>rowkey: book. Column familty: author, qualifiers one, two, three...
>AND similar table for authors
>rowkey: author, Column family books
>
>Best Regards,
>Sonal
>Crux: Reporting for HBase <https://github.com/sonalgoyal/crux>
>Nube Technologies <http://www.nubetech.co>
>
><http://in.linkedin.com/in/sonalgoyal>
>
>
>
>
>
>On Mon, Oct 10, 2011 at 12:05 PM, Syg raf <sy...@gmail.com> wrote:
>
>> I want to be able to get an author or a book and also, i want to be
>>able to
>> get all the authors of a book and all the books of an author (N to N
>> relation in SQL db). Does that give you enough information?
>>
>> Thanks
>> On Mon, Oct 10, 2011 at 2:16 AM, Sonal Goyal <so...@gmail.com>
>> wrote:
>>
>> > How do you want to query your data? This question decides how you can
>> save
>> > your data.
>> >
>> > Best Regards,
>> > Sonal
>> > Crux: Reporting for HBase <https://github.com/sonalgoyal/crux>
>> > Nube Technologies <http://www.nubetech.co>
>> >
>> > <http://in.linkedin.com/in/sonalgoyal>
>> >
>> >
>> >
>> >
>> >
>> > On Mon, Oct 10, 2011 at 11:17 AM, Syg raf <sy...@gmail.com>
>>wrote:
>> >
>> > > Thanks Sam for the link, I'm going to get the book ordered.
>> > >
>> > > Just to start and get familliar with HBase, can yo tell if
>>everything
>> go
>> > > into one table and the data separated into column families? if not,
>> based
>> > > on
>> > > what we create multiple tables ?
>> > >
>> > > Thanks
>> > >
>> > > On Mon, Oct 10, 2011 at 1:28 AM, Sam Seigal <se...@yahoo.com>
>> wrote:
>> > >
>> > > > Start off with the HBase book, great resource for getting started:
>> > > >
>> > > > http://ofps.oreilly.com/titles/9781449396107/
>> > > >
>> > > >
>> > > > On Sun, Oct 9, 2011 at 10:25 PM, Syg raf <sy...@gmail.com>
>> wrote:
>> > > >
>> > > > > Hello folks,
>> > > > >
>> > > > > I'm just starting with HBase and have a couple of rudimentary
>> > questions
>> > > > > about how to use it:
>> > > > >
>> > > > > I have a simple Java program that have been developer for the
>> purpose
>> > > of
>> > > > > learning HBase, the program was built with MySQL as  database,
>>it
>> > > contain
>> > > > 3
>> > > > > tables: Authors, Books and AuthorBook (for the N to N relation).
>> > > > > I am wondering if someone can help me to do the same with HBase,
>> what
>> > > > could
>> > > > > the schema be?
>> > > > > Any recommendations are welcome and just keep in mind that I'm
>>just
>> > > > > beginning, simple explanation would be great.
>> > > > >
>> > > > > Thanks a lot,
>> > > > > Sygura.
>> > > > >
>> > > >
>> > >
>> >
>>


Re: basic question for newbie

Posted by Sonal Goyal <so...@gmail.com>.
One possible schema for your case could be:

rowkey: book. Column familty: author, qualifiers one, two, three...
AND similar table for authors
rowkey: author, Column family books

Best Regards,
Sonal
Crux: Reporting for HBase <https://github.com/sonalgoyal/crux>
Nube Technologies <http://www.nubetech.co>

<http://in.linkedin.com/in/sonalgoyal>





On Mon, Oct 10, 2011 at 12:05 PM, Syg raf <sy...@gmail.com> wrote:

> I want to be able to get an author or a book and also, i want to be able to
> get all the authors of a book and all the books of an author (N to N
> relation in SQL db). Does that give you enough information?
>
> Thanks
> On Mon, Oct 10, 2011 at 2:16 AM, Sonal Goyal <so...@gmail.com>
> wrote:
>
> > How do you want to query your data? This question decides how you can
> save
> > your data.
> >
> > Best Regards,
> > Sonal
> > Crux: Reporting for HBase <https://github.com/sonalgoyal/crux>
> > Nube Technologies <http://www.nubetech.co>
> >
> > <http://in.linkedin.com/in/sonalgoyal>
> >
> >
> >
> >
> >
> > On Mon, Oct 10, 2011 at 11:17 AM, Syg raf <sy...@gmail.com> wrote:
> >
> > > Thanks Sam for the link, I'm going to get the book ordered.
> > >
> > > Just to start and get familliar with HBase, can yo tell if everything
> go
> > > into one table and the data separated into column families? if not,
> based
> > > on
> > > what we create multiple tables ?
> > >
> > > Thanks
> > >
> > > On Mon, Oct 10, 2011 at 1:28 AM, Sam Seigal <se...@yahoo.com>
> wrote:
> > >
> > > > Start off with the HBase book, great resource for getting started:
> > > >
> > > > http://ofps.oreilly.com/titles/9781449396107/
> > > >
> > > >
> > > > On Sun, Oct 9, 2011 at 10:25 PM, Syg raf <sy...@gmail.com>
> wrote:
> > > >
> > > > > Hello folks,
> > > > >
> > > > > I'm just starting with HBase and have a couple of rudimentary
> > questions
> > > > > about how to use it:
> > > > >
> > > > > I have a simple Java program that have been developer for the
> purpose
> > > of
> > > > > learning HBase, the program was built with MySQL as  database, it
> > > contain
> > > > 3
> > > > > tables: Authors, Books and AuthorBook (for the N to N relation).
> > > > > I am wondering if someone can help me to do the same with HBase,
> what
> > > > could
> > > > > the schema be?
> > > > > Any recommendations are welcome and just keep in mind that I'm just
> > > > > beginning, simple explanation would be great.
> > > > >
> > > > > Thanks a lot,
> > > > > Sygura.
> > > > >
> > > >
> > >
> >
>

Re: basic question for newbie

Posted by Syg raf <sy...@gmail.com>.
I want to be able to get an author or a book and also, i want to be able to
get all the authors of a book and all the books of an author (N to N
relation in SQL db). Does that give you enough information?

Thanks
On Mon, Oct 10, 2011 at 2:16 AM, Sonal Goyal <so...@gmail.com> wrote:

> How do you want to query your data? This question decides how you can save
> your data.
>
> Best Regards,
> Sonal
> Crux: Reporting for HBase <https://github.com/sonalgoyal/crux>
> Nube Technologies <http://www.nubetech.co>
>
> <http://in.linkedin.com/in/sonalgoyal>
>
>
>
>
>
> On Mon, Oct 10, 2011 at 11:17 AM, Syg raf <sy...@gmail.com> wrote:
>
> > Thanks Sam for the link, I'm going to get the book ordered.
> >
> > Just to start and get familliar with HBase, can yo tell if everything go
> > into one table and the data separated into column families? if not, based
> > on
> > what we create multiple tables ?
> >
> > Thanks
> >
> > On Mon, Oct 10, 2011 at 1:28 AM, Sam Seigal <se...@yahoo.com> wrote:
> >
> > > Start off with the HBase book, great resource for getting started:
> > >
> > > http://ofps.oreilly.com/titles/9781449396107/
> > >
> > >
> > > On Sun, Oct 9, 2011 at 10:25 PM, Syg raf <sy...@gmail.com> wrote:
> > >
> > > > Hello folks,
> > > >
> > > > I'm just starting with HBase and have a couple of rudimentary
> questions
> > > > about how to use it:
> > > >
> > > > I have a simple Java program that have been developer for the purpose
> > of
> > > > learning HBase, the program was built with MySQL as  database, it
> > contain
> > > 3
> > > > tables: Authors, Books and AuthorBook (for the N to N relation).
> > > > I am wondering if someone can help me to do the same with HBase, what
> > > could
> > > > the schema be?
> > > > Any recommendations are welcome and just keep in mind that I'm just
> > > > beginning, simple explanation would be great.
> > > >
> > > > Thanks a lot,
> > > > Sygura.
> > > >
> > >
> >
>

Re: basic question for newbie

Posted by Sonal Goyal <so...@gmail.com>.
How do you want to query your data? This question decides how you can save
your data.

Best Regards,
Sonal
Crux: Reporting for HBase <https://github.com/sonalgoyal/crux>
Nube Technologies <http://www.nubetech.co>

<http://in.linkedin.com/in/sonalgoyal>





On Mon, Oct 10, 2011 at 11:17 AM, Syg raf <sy...@gmail.com> wrote:

> Thanks Sam for the link, I'm going to get the book ordered.
>
> Just to start and get familliar with HBase, can yo tell if everything go
> into one table and the data separated into column families? if not, based
> on
> what we create multiple tables ?
>
> Thanks
>
> On Mon, Oct 10, 2011 at 1:28 AM, Sam Seigal <se...@yahoo.com> wrote:
>
> > Start off with the HBase book, great resource for getting started:
> >
> > http://ofps.oreilly.com/titles/9781449396107/
> >
> >
> > On Sun, Oct 9, 2011 at 10:25 PM, Syg raf <sy...@gmail.com> wrote:
> >
> > > Hello folks,
> > >
> > > I'm just starting with HBase and have a couple of rudimentary questions
> > > about how to use it:
> > >
> > > I have a simple Java program that have been developer for the purpose
> of
> > > learning HBase, the program was built with MySQL as  database, it
> contain
> > 3
> > > tables: Authors, Books and AuthorBook (for the N to N relation).
> > > I am wondering if someone can help me to do the same with HBase, what
> > could
> > > the schema be?
> > > Any recommendations are welcome and just keep in mind that I'm just
> > > beginning, simple explanation would be great.
> > >
> > > Thanks a lot,
> > > Sygura.
> > >
> >
>

Re: basic question for newbie

Posted by Syg raf <sy...@gmail.com>.
Thanks Sam for the link, I'm going to get the book ordered.

Just to start and get familliar with HBase, can yo tell if everything go
into one table and the data separated into column families? if not, based on
what we create multiple tables ?

Thanks

On Mon, Oct 10, 2011 at 1:28 AM, Sam Seigal <se...@yahoo.com> wrote:

> Start off with the HBase book, great resource for getting started:
>
> http://ofps.oreilly.com/titles/9781449396107/
>
>
> On Sun, Oct 9, 2011 at 10:25 PM, Syg raf <sy...@gmail.com> wrote:
>
> > Hello folks,
> >
> > I'm just starting with HBase and have a couple of rudimentary questions
> > about how to use it:
> >
> > I have a simple Java program that have been developer for the purpose of
> > learning HBase, the program was built with MySQL as  database, it contain
> 3
> > tables: Authors, Books and AuthorBook (for the N to N relation).
> > I am wondering if someone can help me to do the same with HBase, what
> could
> > the schema be?
> > Any recommendations are welcome and just keep in mind that I'm just
> > beginning, simple explanation would be great.
> >
> > Thanks a lot,
> > Sygura.
> >
>

Re: basic question for newbie

Posted by Sam Seigal <se...@yahoo.com>.
Start off with the HBase book, great resource for getting started:

http://ofps.oreilly.com/titles/9781449396107/


On Sun, Oct 9, 2011 at 10:25 PM, Syg raf <sy...@gmail.com> wrote:

> Hello folks,
>
> I'm just starting with HBase and have a couple of rudimentary questions
> about how to use it:
>
> I have a simple Java program that have been developer for the purpose of
> learning HBase, the program was built with MySQL as  database, it contain 3
> tables: Authors, Books and AuthorBook (for the N to N relation).
> I am wondering if someone can help me to do the same with HBase, what could
> the schema be?
> Any recommendations are welcome and just keep in mind that I'm just
> beginning, simple explanation would be great.
>
> Thanks a lot,
> Sygura.
>