hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Daniel Cryans <jdcry...@apache.org>
Subject Re: fetch data in 1-n relationship
Date Thu, 11 Jun 2009 03:41:29 GMT
monty,

2 things you can do:

1- Serialize courses data into the courses family in the student
table. You duplicate data, but disk is cheap so that's ok now.

2- If all you need is to first show the course id and the course title
(or description), you can just put that as the value in the courses
family and do the get on the courses table only if you need to.

J-D

On Wed, Jun 10, 2009 at 12:56 AM, monty123<mayurchoubey@yahoo.com> wrote:
>
> Hi All
>
> I define two tables having one to many relationship:
>
> Student:
>    student id
>    student data (name, address, ...)
>    courses  (use course ids as column qualifiers here)
>
> Course:
>   course id
>   course data (name, syllabus, ...)
>
> My problem is, using Java client/program how to fetch courses ID from
> student table
> coz they are stored like ( courses:2001 ) and course id is (2001), I am
> confused :(
> and whether I need to perform another query to fetch details of courses
> table.(to simulate join in rdbms)
>
> --
> View this message in context: http://www.nabble.com/fetch-data-in-1-n-relationship-tp23957512p23957512.html
> Sent from the HBase User mailing list archive at Nabble.com.
>
>

Mime
View raw message