Segment using multiple user (client) database schemas, each user can only see the data for their client. Should you want to you can build views to pull data from each user schema into a super user view. For ultimate security you could use something like Oracle VPD, but you can achieve the same affect using database views.
Hope this helps. On 27 January 2011 16:30, Greg Reddin <[email protected]> wrote: > I'm working on a portal for doing analysis and reporting of survey > results. I'm trying to find the best strategy for segmenting multiple > clients' data with an O/R mapping tool like Hibernate. > > The metadata structure is a parent-child relationship like this: > > client -> study -> project -> variable -> value > > A client has one or more studies. A study consists of one or more > projects. A project consists of multiple variables that make up the > questions on the survey and/or respondent attributes that are used in > reporting. The values are the code lists of valid responses that are > available for each variable. Questions that are "open-end" in nature > do not have a list of predefined values. The relationship between a > study and a project is somewhat fluid at the moment and may change. > > We need a shared data store to contain a list of all the clients and > studies/projects. But, naturally, each client wants their own data > contained in a database separated from other client data. That's the > metadata structure. The actual survey data that we report on and > analyze is contained is a separate flat table for each study/project. > > This metadata structure is easily modeled with OR mapping tools. But > they all seem to fall apart when you need to contain each > project/study's data in a separate database. You really need a > separate SessionFactory or EntityManagerFactory for each one, but they > all contain identical class structures with identical O/R mappings . > Could anyone share your experiences with implementing something like > this? > > Thanks, > Greg > > -- > You received this message because you are subscribed to the Google Groups > "The Java Posse" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<javaposse%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/javaposse?hl=en. > > -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
