hi Venkat
i think you better post a new question in a new topic.
it is hard to answer such a general question, perhaps
you should first read one of the tutorials on hibernat, learn how to insert/query a single object and then do the next step and add relations to your objects.
As a hint for your problem: you can query for objects using HQL. HQL is similar to SQL.
if you have a specifi question then dont forget to post the code you have so far.
these links might be useful:
hibernate documentaion external hibernate docs ant tutorials
pascal