0 Replies Latest reply on Feb 28, 2006 3:00 PM by Frank Zartmann

    Data modeling and persistence with EJB3

    Frank Zartmann Newbie

      Hello everybody,

      I would like to migrate an application to EJB3.
      Let me give a short explanation of the old application:

      The application governs data in n table t1, .. , tn, where n is about 500.
      The data in these tables add up up to 500MB. Let me call this data the mass data.

      For each table tj (0<j<n+1) the application stores some metadata, including the number of columns, the types and names of the columns, etc. .
      Furthermore the application governs data for the user administration, connection data to other systems and for other functionalities. Let me call this data the meta data.

      I can model the meta data in a clean object oriented way and represent it with EJB3 entity beans. So Hibernate can do the persistence job. This works fine.

      But the data modelling and persistence of the mass data is not so straightforward. In the
      old application you can create new tables with an arbitrary number of columns. That means, that it's not known at compile time:

      - The number n of tables
      - The number of columns for each table tj (0<j<n+1)
      - The type of each column. Although we can restrict the types in the database to varchar2 and number. The length of the fields with type varchar2 varies between 1 and 1000.

      I'm interested in the following two questions:

      1) How to model such mass data in the application server?
      2) How to make such mass data persistent using the EJB3 framework?

      Any share of experiences is appreciated.

      Best Regards

      Frank