Neetu, In my opinion it is a bad idea to "copy paste" a normalized schema from an RDBMS to a nosql database like hbase. Hbase encourages denormalization. Hbase does not support indexing out of the box like mysql/postgres/etc. So your retrieval time would be affected as the data size grows. For indexing in hbase you have to separately create indexes either as a hbase table or use solr, etc. For purposes of understanding hbase you can treat the primary key to be equivalent to the row key in hbase. I don't think there is any concept of foreign keys in hbase but you could explore coprocessors in hbase to implement something that is equivalent to foreign keys.
- Rohit Kelkar On Wed, Mar 28, 2012 at 10:05 AM, Neetu Ojha <[email protected]> wrote: > Hi Jean, > > Thanks A lot for reply, I got your point about HBASE , let me give a > little clear picture of what I am desiring from HBase , If any body is > willing to migrate ones application on Hadoop and at teh same time migrate > Mysql database to Hbase to get the advantage of the Hbase in that case if > migrate Mysql databae or any relational database to Hbase using tools like > sqoop , but as the database in mysql has tables relation's maintained with > foreign key , primary key so what need to be done Hbase side to maintain > the integrity and dependency of one data on the other or its totally a bad > idea to migrate from Relational database to Hbase. > > PLease through some light on that if possible. > > And I am sure many people must have faced this situation while working > wkith Hadoop, Hbase for first time. > > > REgards > Neetu > > On Wed, Mar 28, 2012 at 12:43 AM, Jean-Daniel Cryans > <[email protected]>wrote: > >> Hi, >> >> HBase is not a relational database, it doesn't have foreign keys or >> constraints. I'd suggest you familiarize yourself with HBase by >> reading the refence manual[1] or buying the book[2]. >> >> Regards, >> >> J-D >> >> 1. http://hbase.apache.org/book/book.html >> 2. http://www.amazon.com/dp/1449396100 >> >> On Tue, Mar 27, 2012 at 5:25 AM, Neetu Ojha <[email protected]> >> wrote: >> > Dear all, >> > >> > I used sqoop tool to migrate the mysql table to hbase but I have not got >> > any clearity yet that how the primary keys and foreign keys are preserved >> > in Hbase for the tables migrated from mysql database to hbase so that >> user >> > can access the tables from hbase with having the assurance of the data >> > integrity and behaviour as it was on Mysql database. >> > >> > My idea is ti present Hbase as Cloud storage solution and where users can >> > migrate there mysql database to Hbase and the behaviour and data >> integrity >> > is entact too. >> > >> > If any one has experience of the same or idea please share with me. >> > >> > >> > Thanks & Regards >> > Neetu >>
