Discussions
EJB programming & troubleshooting: EJB CMP,Where it is begun?, data base schema or entity beans
-
EJB CMP,Where it is begun?, data base schema or entity beans (3 messages)
- Posted by: Yeray Santana Borges
- Posted on: February 12 2007 04:12 EST
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 advanceThreaded Messages (3)
- Re: EJB CMP,Where it is begun?, data base schema or entity beans by Hanumanth Kanthi on February 14 2007 13:52 EST
- Re: EJB CMP,Where it is begun?, data base schema or entity beans by Yeray Santana Borges on February 15 2007 04:28 EST
- Re: EJB CMP,Where it is begun?, data base schema or entity beans by PJ Murray on February 15 2007 16:16 EST
-
Re: EJB CMP,Where it is begun?, data base schema or entity beans[ Go to top ]
- Posted by: Hanumanth Kanthi
- Posted on: February 14 2007 13:52 EST
- in response to Yeray Santana Borges
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 -
Re: EJB CMP,Where it is begun?, data base schema or entity beans[ Go to top ]
- Posted by: Yeray Santana Borges
- Posted on: February 15 2007 04:28 EST
- in response to Hanumanth Kanthi
thanks, i will read it -
Re: EJB CMP,Where it is begun?, data base schema or entity beans[ Go to top ]
- Posted by: PJ Murray
- Posted on: February 15 2007 16:16 EST
- in response to Yeray Santana Borges
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