[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - General design question (entities)

krudz do-not-reply at jboss.com
Thu May 31 01:29:09 EDT 2007


I'm quite new to all these EJB3 annotations.
At present we have to redesign our application. In general, what we want to achieve is storing documents with multi-lingual, versioned dictionaries.

DataBase desgin: (very simplified)
Documents table:
DOC_ID ..... some other doc columns DICT_ID
122    ..........                                        12

Dictionaries table:
DICT_ID DICT_LOCALE DICT_VALUE
12             en_GB          british value
12             de_DE          german value

Dictionary is also versioned - we store versions in this table to. But to simplify, it is not important.

The question is how to design entity beans in order to be able to write EJB query fetching document together with dictionary value for proper locale:
getDocument(docId, locale).

We have a workaround, getting the document, and then fetching the dictionary for it, but it's inefficient. We'd like to fetch millions of documents in the future.

Any suggestions for these two entity beans and EJB-query getting the document? Maybe the DB design is wrong?
We use hibernate.

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

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



More information about the jboss-user mailing list