EJB and Database

Discussions

EJB design: EJB and Database

  1. EJB and Database (3 messages)

    Hi,

    We are developing J2EE application from scratch. Regarding the entity beans and database, I'm not sure which should be firstly designed. I understand that in most cases the enity beans are the map of database. In a reverse way, can we say that the database can be created based on the entity beans we designed? So, should the database be designed first, or the entity beans be designed first?

    Thanks in advance.
    Lijun

    Threaded Messages (3)

  2. EJB and Database[ Go to top ]

    Hello, Lijun,

    you must do first the whole database design, and when you' ve finished it, you can design your Entity Beans and as you say, the Entity are the map of the database.


    Regards,

    Poli

    (ppolinario at hotmail dot com)
  3. EJB and Database[ Go to top ]

    Thanks for your reply, Poli. I believe you must have this experience. Could you tell me how you worked out the database structure? Do you think the entity beans can be independent of database if the design follows the UML design patterns?

    Regards,
    Lijun
  4. EJB and Database[ Go to top ]

    Hello, Lijun,

    the Entity Beans aren't independent of database, you must design your UML patterns based on your database design. For example, you should implement methods in your Entity to get and set the values of the table and to find by the values of the table too, I means that you should design your business methods based on the values of the table of the database. I hope that this will help you, what I say to you it is based on my experience.

    Regards,

    Poli