aspose file tools*
The moose likes Object Relational Mapping and the fly likes ORM Patterns/Data structure question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "ORM Patterns/Data structure question" Watch "ORM Patterns/Data structure question" New topic
Author

ORM Patterns/Data structure question

Sharon whipple
Ranch Hand

Joined: Jul 31, 2003
Posts: 294
Hi all,
I hope this is the correct forum for such topic; I am looking for a correct data structure for this problem.
I have several types of objects of the same type plane, each plane has different lubrication due dates, some have 1 part to lubricate, some have 10 parts to lubricate

Type, lub dates:
  • Cessna # engine lub date # wheel lub date
  • Jet plane # engine lub date # wheel lub date # prop lub date
  • jumbo 747 # engine1 lub date # engine2 lub date # wheels lub date (total 15 columns)
  • Antonov (This one... ) #engine1 .. .engine n lub date# wheels lub date (total 20 columns)



  • As far as ORM I was thinking of a flat table with [plane type] column and all possible lub dates as columns
    My debate is the Java side – how to represent this using JPA/Hibernate objects
    Should I use hibernate inheritance? Drawback from in inheritance is the need to recompile the code for each new plane, and mass amount of java classes, another problem is the need to handle each class in the UI separately

    Please advice for better data structure for this problem
    Thank you

    Jan Cumps
    Bartender

    Joined: Dec 20, 2006
    Posts: 2503
        
        8

    I moved your post to our Object Relational Mapping forum.


    OCUP UML fundamental and ITIL foundation
    youtube channel
     
    jQuery in Action, 2nd edition
     
    subject: ORM Patterns/Data structure question