You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Subhash Pophale <su...@gmail.com> on 2016/05/31 18:18:29 UTC
How to designTemporal table in Hbase
Hi All,
I am new to Hbase database. I am planning to create rather mimic table
in RDBMS which is temporal table which has below columns:
Col1
Col2
From_Date
To_Date
Created
Expired
Primary Key is : {Col1,From_Date,Expired}
Anyone has idea what is best Hbase design structure for such table?
Many Thanks!
Regards,
Subhash Pophale
Re: How to designTemporal table in Hbase
Posted by Mohammad Tariq <do...@gmail.com>.
I don't think trying to 'mimic' an RDBS table in HBase is a very good idea.
They both are completely different from each other, both in design and
usage. For example, In order to get the latest value for a given column you
don't have to do anything extra. You just do a Get operation on the desired
rowkey, and by default HBase always gives you the latest value.
You could probably have a composite rowkey consisting of the fields you are
going to use most frequently during data retrieval. It's actually a bit
difficult to suggest something substantial without proper information on
your use case.
[image: http://]
Tariq, Mohammad
about.me/mti
[image: http://]
<http://about.me/mti>
On Wed, Jun 1, 2016 at 12:03 AM, Subhash Pophale <su...@gmail.com>
wrote:
> Hi
>
> It would be like:
> 1) What is the latest (Expired = '31-Dec-9999') value of "col2" for
> "col1" in date range between "From_Date" and "To_Date"?
>
>
> On 5/31/16, Mohammad Tariq <do...@gmail.com> wrote:
> > Hi Subhash,
> >
> > What would be your query pattern like?
> >
> >
> >
> > [image: http://]
> >
> > Tariq, Mohammad
> > about.me/mti
> > [image: http://]
> > <http://about.me/mti>
> >
> >
> > On Tue, May 31, 2016 at 11:48 PM, Subhash Pophale
> > <subhash.pophale@gmail.com
> >> wrote:
> >
> >> Hi All,
> >>
> >> I am new to Hbase database. I am planning to create rather mimic table
> >> in RDBMS which is temporal table which has below columns:
> >>
> >> Col1
> >> Col2
> >> From_Date
> >> To_Date
> >> Created
> >> Expired
> >>
> >> Primary Key is : {Col1,From_Date,Expired}
> >>
> >> Anyone has idea what is best Hbase design structure for such table?
> >>
> >> Many Thanks!
> >>
> >> Regards,
> >> Subhash Pophale
> >>
> >
>
Re: How to designTemporal table in Hbase
Posted by Subhash Pophale <su...@gmail.com>.
Hi
It would be like:
1) What is the latest (Expired = '31-Dec-9999') value of "col2" for
"col1" in date range between "From_Date" and "To_Date"?
On 5/31/16, Mohammad Tariq <do...@gmail.com> wrote:
> Hi Subhash,
>
> What would be your query pattern like?
>
>
>
> [image: http://]
>
> Tariq, Mohammad
> about.me/mti
> [image: http://]
> <http://about.me/mti>
>
>
> On Tue, May 31, 2016 at 11:48 PM, Subhash Pophale
> <subhash.pophale@gmail.com
>> wrote:
>
>> Hi All,
>>
>> I am new to Hbase database. I am planning to create rather mimic table
>> in RDBMS which is temporal table which has below columns:
>>
>> Col1
>> Col2
>> From_Date
>> To_Date
>> Created
>> Expired
>>
>> Primary Key is : {Col1,From_Date,Expired}
>>
>> Anyone has idea what is best Hbase design structure for such table?
>>
>> Many Thanks!
>>
>> Regards,
>> Subhash Pophale
>>
>
Re: How to designTemporal table in Hbase
Posted by Mohammad Tariq <do...@gmail.com>.
Hi Subhash,
What would be your query pattern like?
[image: http://]
Tariq, Mohammad
about.me/mti
[image: http://]
<http://about.me/mti>
On Tue, May 31, 2016 at 11:48 PM, Subhash Pophale <subhash.pophale@gmail.com
> wrote:
> Hi All,
>
> I am new to Hbase database. I am planning to create rather mimic table
> in RDBMS which is temporal table which has below columns:
>
> Col1
> Col2
> From_Date
> To_Date
> Created
> Expired
>
> Primary Key is : {Col1,From_Date,Expired}
>
> Anyone has idea what is best Hbase design structure for such table?
>
> Many Thanks!
>
> Regards,
> Subhash Pophale
>