Results 1 to 2 of 2

Thread: Tables In Ejb3

  1. #1
    Alan is offline Member
    Join Date
    May 2007
    Rep Power

    Default Tables In Ejb3


    I am working with EJB3 and I have the next doubt:
    I have in my dbase 3 tables with the same structure (Mov2005, Mov2006 and Mov2007) and the records be inserted in these depending of the year in the date of the movement.

    they all have the same structure, the ideal thing would be create the only entity that administers the information, but here my great worry comes and is how I say to to the EntityManager that it should insert in certain table depending the year of the movement?

    I have investigated and the only thing that I found is to create an entity for every table and to use CreateQuery to create the Dynamical sql, but this would imply that every year it is necessary to modify the application to create the entity. One thought of leaving the whole movement in the same table, but the volume of records per year is high and starts getting lost time of response.

    Any suggestions?
    Last edited by Alan; 06-01-2007 at 01:47 AM.

  2. #2
    Marty is offline Member
    Join Date
    May 2007
    Rep Power


    What is your database? sql? mysql? the thing that you want to do calls:"Partinioning"that is to say, to save a table (that is waited is very big) partitioned in several tables from criteria
    It is practical commonly when one works with big volume and motors such as: oracle and PostgreSQL have this functionality and are transparent to the development of the application. Notice if you solve for this side.
    good luck
    Last edited by Marty; 06-01-2007 at 03:34 PM.

Similar Threads

  1. caching the tables
    By jayashree in forum JDBC
    Replies: 0
    Last Post: 01-30-2008, 06:43 AM
  2. Can I use annotations in superclass, and .cfg.xml files in subclasses in EJB3
    By narayanrec in forum Enterprise JavaBeans (EJB)
    Replies: 4
    Last Post: 01-06-2008, 02:40 AM
  3. how to sort 2 tables
    By valery in forum AWT / Swing
    Replies: 1
    Last Post: 08-06-2007, 08:30 PM
  4. EJB3 question
    By bbq in forum Enterprise JavaBeans (EJB)
    Replies: 2
    Last Post: 07-04-2007, 08:58 AM
  5. Replies: 3
    Last Post: 05-14-2007, 05:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts