For some queries it is complicated to express them directly in SQL. Even more so when they are not hand-written, but generated from something the user entered. Say, the user wants to search for person records where the name contains some string. Now, while the Rails model may have a name attribute, the database table does not. There the name is decomposed into title, firstname, lastname and possibly other adjuncts. Yes, I can think of ways to handle this generically. It could be much easier, however, to push this task into the database, for instance by defining a read-only view containing a synthetic name column made up of the individual pieces. Then, on the Rails side of things, there would have to be a way to use one table -- the view -- for find''ing records and another table for insert/update. Has anyone thought this through further or even implemented something like it? Michael -- Michael Schuerig The Fifth Rider of the Apocalypse mailto:michael-q5aiKMLteq4b1SvskN2V4Q@public.gmane.org is a programmer. http://www.schuerig.de/michael/