views:

16

answers:

0

Hi everybody,

I am new to the all technologies just familiar with the introduction of both... I am planning to make railway reservation project, in that I want to use MySQL with Hibernate... So I have one sample design of database to make a project, I need help to combine the MySQL with Hibernaete...

Database Design... trains (ID,name,from,to,date) PK(ID)

boogies (ID,trainId,name,) CompositeKey(trainId,boogieId)...

seats (ID, trainID, boogieID, status, type ) CompositeKey(trainId,boogieId,seatId)

users (ID, name, ... personal details) PK (ID)

userBookings (ID, userId, trainId, boogieId, seatId) CompositeKey(trainId,boogieId,seatId)

Suggest me is this a good design of database to implement a web application if yes then reply me how to use hibernate in this type of table structure like mapping... one-many many-one one-one many-one

Please Help me...