EJB programming & troubleshooting: EJB CMP,Where it is begun?, data base schema or entity beans

  1. hi, Im a spanish novice that is learning EJB with CMP persistence. In the desing, what is the begening?, i must develop EJB from an existence database schema or my database schema is created when the EJB is develop inside a j2ee container?? i dont know where it is begun. In after works with java and database, i begin for develop a database, develop entities with E/R database model for get the tables and make relationships with it and finaly i get a relational database, my database server makes all of processing relations with keys and foregin keys. But now, with EJB CMP i dont know if i must follow this procedure, because when i implement the relationships in a j2ee container, the code make his own model and the relation is mantain with the j2ee server and not for the database server, in this point E/R database desing is not applicable Since can i know the way of following a procedure or other one? must i develop a E/R database model (obtain the tables, his keys, foregin keys and relationships) and after implement the entity beans over that or must i develop entity beans with his relationships and primary keys and forget the underlayer database implementation?? sorry for my poor english, i learning english too thanks in advance
  2. Essentially there are three patterns that you have to look into: 1) Top down (Develop bean first then derive db schema) 2) Bottom up (Develop db schema first and drive upwards to create bean from your schema) 3) Meet in the middle (Create Bean and db schema and map both respectively) Pl. look into following IBM Redbook for more information on this(Chapter-15): http://www.redbooks.ibm.com/redbooks/pdfs/sg246449.pdf Hope that helps... Cheers, H. Kanthi
  3. thanks, i will read it
  4. I think this blog entry on choosing a data persistence strategy will help you: http://www.codefutures.com/weblog/andygrove/archives/2005/01/choosing_a_java.html PJ Murray, CodeFutures Software Data Access Objects and Service Data Objects