You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Raymond Barlow <rb...@raymanoz.com> on 2003/06/04 10:37:56 UTC

Database views

Hi all,

I'd like to get a general opinion on what is the best practise for using 
database views or not. I'm currently converting a system that has a 
number of views. Some of the views use other views to build up reporting 
type information. I would think that in a totally clean class driven 
environment views would be bad, as the tables should only be used for 
persistence.

If views are bad, how do you build up the same sort of thing using 
OJB/persistant classes? ie. where there were views using views, what is 
the equivalent way of thinking in OJB? What would you generally do here?

-- 
Regards,
Raymond Barlow





Re: Database views

Posted by Thomas Mahler <th...@web.de>.
Hi Raymond,



Raymond Barlow wrote:
> Hi all,
> 
> I'd like to get a general opinion on what is the best practise for using 
> database views or not. I'm currently converting a system that has a 
> number of views. Some of the views use other views to build up reporting 
> type information. I would think that in a totally clean class driven 
> environment views would be bad, as the tables should only be used for 
> persistence.
> 
> If views are bad, how do you build up the same sort of thing using 
> OJB/persistant classes? ie. where there were views using views, what is 
> the equivalent way of thinking in OJB? What would you generally do here?

If you do not want to use database views you can use OJB report queries 
to perform arbitrary queries and present the result as a view.

But why not use database views and map them to view-classes. I think 
this can be a good solution in certain cases.

just my 2c,
Thomas