File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "ORM Patterns/Data structure question" Watch "ORM Patterns/Data structure question" New topic

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

    Joined: Dec 20, 2006
    Posts: 2565

    I moved your post to our Object Relational Mapping forum.

    OCUP UML fundamental and ITIL foundation
    I agree. Here's the link:
    subject: ORM Patterns/Data structure question
    It's not a secret anymore!