Pattern to manage tables?? DAO??


EJB design: Pattern to manage tables?? DAO??

  1. Pattern to manage tables?? DAO?? (8 messages)

    I'm looking for some pattern that can encapsulate all the access to a RDMBS tables, now i'm using DAO with and abstract factory but this mean that if I want to persists some object the implementation of this DAO needs to know the exactly SQL string to manage this.. So there is some pattern that could be more flexible in the way that only I call with the parameters, the type of operation (insert, update, delete,..) and the name of the table and it can made the operation???

    Is this a problem of JDBC and not a pattern?? is this a hard coded library?? some ideas to manage this??

    Thanks in advance

    Threaded Messages (8)


    see pages 390 to 407 in the book "Core J2EE Patterns" -

    read Chapter 4 in "Enterprise JavaBeans Component Architecture: Designing and Coding Enterprise Applications" -

    com.ibatis.db.dao package in

    Benefits of DAO in a J2EE application:

    presentation from JavaOne 2001:

    DAO discussion: at avalon dot apache dot org/msg00164.html
  3. Thanks for your soon replay, I read somthing about you send me and desing a solution based on a Abstract Factory pattern that factory's some command like Selec Insert, etc. so in this way I can do the effect, No wI 'm try to generate another Abstract Factory that create for me the particualr DAO over the tables.

    Thnaks Again
  4. Hibernate[ Go to top ]

    Use Hibernate ( instead of straight JDBC.
  5. You can follow the command patterns. I believe this is discussed in the EJB desgin patterns book available at this website. Basically your class implements an interface with an execute method and maybe some method to set your parameters etc.
  6. SpringFramework, JDBC[ Go to top ]

    If you are looking for a JDBC abstraction layer, look at the
    Spring Framework,

    If you want to see example DAO code, visit
  7. Re: SpringFramework, JDBC[ Go to top ]

    you can check spring tutorial at
  8. Re: SpringFramework, JDBC[ Go to top ]

    Hi, Some of good questions on Hibernate at Thanks.
  9. hibernate help[ Go to top ]

    hi i am new to hibernate and also discussion of theserverside. Can anyone pls help me to solve my doubts? Actully I have to develop a standalone application, so hibernate is a good choice or not for that? Thanks!