Hello, I have four tables in a relational database.

*First table, called "establishments", contains two fiels "db_establishment_id" and 
"db_establishment_name".
Here is a sample:


  | db_establishment_id(pk) db_establishment_name
  | ---------------------------------------------
  | 1                       The black frog
  | 2                       The king's head
  | 3                       McDonalds
  | 

*Second table, called "categories",  contains two fields "db_category_id" and 
"db_category_name"
Here is a sample:

  | db_category_id(pk)     db_category_name
  | -----------------------------------
  | 1                      restaurant
  | 2                      pub
  | 


*Third table, called "establishments_qualifiers", contains two fields 
"db_establishment_id" and "db_id_category"
Here is a sample:

  | db_establishment_id(pk,fk)    db_category_id(pk,fk)
  | --------------------------------------
  | 1                             2
  | 2                             2
  | 2                             1
  | 3                             1
  | 

*Fourth table, called "visitors_comments", contains two fields "db_establishment_id" 
and "db_comment"
Here is a sample:


  | db_establishment_id(pk)   db_comment
  | -----------------------------------
  | 2                         nice pub
  | 3                         cheap food
  | 3                         yok!
  | 

My question is as follows: does one need four ejbs or can I have a single ejb here? 
(I'd rather have one). Ideally I'd like ONE ejb as follows:


  | -int establishement_id
  | -String establishment_name
  | -List categories
  | -List comments
  | 

How can I have a single ejb with the variables as above? Do I need BMP or CMP?

Thanks in advance and sorry for the length of my post,

Julien Martin.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3832232#3832232

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3832232


-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to