I need to create a table for the data being captured. The data is captured in the following format.
This data is for each vessel
SrNo LoadingPosition Hatch1 Hatch2 Hatch3 Hatch4 Hatch5 Total A PRE STOWAGE PLAN B LAST 24 HRS C PREVIOUS D TOTAL E BALANCE
These are the details i need to store for different hatches and the hatches are dynamic depending on the vessel. I need a data model or some object model to represent this.
we are using Hibernate and came up with a model like this. Each Vessel ---- has a Set of Positions ----------Each Position has a Set of Hatches.
So three tables to represent this . This looks fine. However the the data to be stored differs on cargo type. If it is a bulk cargo we have hatches , for petrol we have no hatches.
bulk and tanker are two categories of info we need to store Should we go for table per class hierarchy to store both BULK AND TANKER using a discriminator or go for table per subclass.
Thanks
nelson christos
Ranch Hand
Joined: Aug 08, 2006
Posts: 57
posted
0
In the previous post BULK and TANKER are 2 types of cargo and HATCH is associated only to bulk
Have you tried using Hibernate tools to auto generate you tables based on your mapping?
Mark
nelson christos
Ranch Hand
Joined: Aug 08, 2006
Posts: 57
posted
0
this is our first project in hibernate, so we are not going fully on a top down approach. we are creating the objects in UML and then we will be trying to create the tables in dB and later auto generate the hbm from ddl
Thanks
Nelson [ March 28, 2008: Message edited by: nelson christos ]
Originally posted by nelson christos: this is our first project in hibernate, so we are not going fully on a top down approach. we are creating the objects in UML and then we will be trying to create the tables in dB and later auto generate the hbm from ddl
Thanks
Nelson
[ March 28, 2008: Message edited by: nelson christos ]
Ah, well there is this other tool, I have never used it myself. The tool is called Andromda, or something like that, that supposedly can take UML and make Java objects, then use the Hibernate tool to create the tables. You can just play with it to see what kind of tables to create.
With this being an ORM forum, we don't do data modeling in threads.
Mark
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.