|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
HBase -- unique constraintsI am evaluating if HBase is right for a small prototype I am developing.
Please help me understand a few things: 1. Can I do something like this in RDBMS -- "select * from table WHERE column LIKE '%xyz%'" 2. How should we place constraints? For example, if I have a Users table, and one column is "login_name". How can I ensure that no two people create the same login name? Is there a constraint I can place or something similar? 3. Is there something with HBase tables that I CANNOT do? If there is, what is the strategy I have to use? 4. For something not possible with HBase today, can I simply use the MapReduce framework that comes with Hadoop over the HBase tables? Thanks in advance |
|
|
Re: HBase -- unique constraintsanwers inline
On Thu, Oct 29, 2009 at 5:24 PM, learningtapestry <satishb10@...>wrote: > > I am evaluating if HBase is right for a small prototype I am developing. > > Please help me understand a few things: > > 1. Can I do something like this in RDBMS -- "select * from table WHERE > column LIKE '%xyz%'" > You can create ValueFilters and scan through a table. But there is no query language as such. > 2. How should we place constraints? For example, if I have a Users table, > and one column is "login_name". How can I ensure that no two people create > the same login name? Is there a constraint I can place or something > similar? > It has to be in your application. Nothing in hbase gives this feature afaik > > 3. Is there something with HBase tables that I CANNOT do? If there is, what > is the strategy I have to use? > There is no concept of relational data. Its a different way of thinking about data. Everything is denormalized. For details, read the BigTable paper. > > 4. For something not possible with HBase today, can I simply use the > MapReduce framework that comes with Hadoop over the HBase tables? > What do you mean? You can surely write MR jobs that talk to HBase but thats not a workaround to RDBMS kind of stuff. If you need RDBMS kind of functionality, maybe HBase is not for you. > > Thanks in advance > -- > View this message in context: > http://www.nabble.com/HBase----unique-constraints-tp26123147p26123147.html > Sent from the HBase User mailing list archive at Nabble.com. > > |
|
|
Re: HBase -- unique constraints
In a multi threaded environment, how would two threads know if two users are creating the same username at the same time for insertion into the database? It surely doesn't seem like the application can control this behavior except through some synchronization mechanism (which wouldn't scale very well). In a clustered environment it becomes even more harder. Who knows if two machines in the cluster are trying to write the same username to the DB at the same time? There synchronization in the code will not even work. I was reading that Streamy.com is running entirely on HBase. So isn't HBase being promoted as suitable for OLTP type applications? In short, would an e-commerce website be capable of running entirely on HBase? |
|
|
Re: HBase -- unique constraintsOn Thu, Oct 29, 2009 at 6:33 PM, satb <satishb10@...> wrote:
> > > > >> 2. How should we place constraints? For example, if I have a Users > table, > >> and one column is "login_name". How can I ensure that no two people > >> create > >> the same login name? Is there a constraint I can place or something > >> similar? > >> > > > > It has to be in your application. Nothing in hbase gives this feature > > afaik > > > > > In a multi threaded environment, how would two threads know if two users > are > creating the same username at the same time for insertion into the > database? > It surely doesn't seem like the application can control this behavior > except > through some synchronization mechanism (which wouldn't scale very well). > > > > > >> > >> 4. For something not possible with HBase today, can I simply use the > >> MapReduce framework that comes with Hadoop over the HBase tables? > >> > > > > What do you mean? You can surely write MR jobs that talk to HBase but > > thats > > not a workaround to RDBMS kind of stuff. If you need RDBMS kind of > > functionality, maybe HBase is not for you. > > > > > >> > >> Thanks in advance > > > > > > I was reading that Streamy.com is running entirely on HBase. So isn't HBase > being promoted as suitable for OLTP type applications? > > In short, would an e-commerce website be capable of running entirely on > HBase? > > for them. They can give you better insight into how they use it. Like I mentioned earlier too, HBase is good for denormalized data. If you want any of the SQL like features in real time, we dont have that. However, if you want to do batch processing, you can certainly write MR jobs to do almost anything. Also, you can look at frameworks like Cascading and Pig. Both of them can be made to talk to HBase. > > > -- > View this message in context: > http://www.nabble.com/HBase----unique-constraints-tp26123147p26123719.html > Sent from the HBase User mailing list archive at Nabble.com. > > |
| Free embeddable forum powered by Nabble | Forum Help |