From: Tim Bates Date: 2004-01-08T15:24:41+09:00 Subject: Re: Database applications and OOness On Thu, Jan 08, 2004 at 05:03:41AM +0900, David Naseby wrote: > I liek the look of ROE > (http://www.cincomsmalltalk.com/userblogs/avi/blogView?showComments=true&ent > ry=3246121322) on Squeak. Don't know if its what you're looking for of > course, since even you don't know what you're looking for :) This article has a point that I've seen before, namely that object models don't necessarily have a 1-to-1 mapping to relational models: "[Object-relational mapping] adds a huge amount of complexity to a project, and with dubious benefits: when you're not tracking down bugs in the mapping framework or obsessing about performance, you're chopping toes off your object model so you can shoehorn it into a relational schema." The OO relational-query model he describes looks very much like Criteria, and I think if I were to go along that route I would definitely use Criteria and DBI. But some inner Ruby demon is constantly telling me that I'd really like to represent my data as first-class objects _when_possible_, which Criteria doesn't even try to do. Essentially, now, I think I want Lafcadio on Postgres with Criteria (or Criteria-like) queries and transaction support. I like the way (and correct me if I'm wrong about this) Lafcadio uses the RDBMS the way it was meant to be used - unlike Vapor (which adds extra tables and columns for metadata and generally wrests control of the RDBMS out of the hands of the user) or Mephle (which basically only uses the RDBMS as somewhere to write data to). I don't like Lafcadio's query model (which I haven't tried to use, but the author himself assures me is "ugly as hell") and I do really like Criteria's query model, so the best of both worlds there would just about be enough to satisfy me. I'm pretty fixed on using an SQL back-end, because it outsources much of the calculation and concurrency issues to another program which is built for it, but just so I can say I have considered all the options can someone tell me if there's a non-SQL OO solution out there which, most importantly, doesn't store all its data in memory all the time - some of my data needs to be kept for a long time but will very seldom be referenced, and I don't want to have to manually write it to disk. I've seen things like Madeline and other Prevayler-type things, and they seem to want to keep everything in memory and only write snapshots and logging to disk. A neat query model and some in-built concurrency support (even if it's just read/write locking) would be added bonuses. Tim Bates -- tim@bates.id.au