From: Todd Blanchard tblanchard@mac.com Reply-To: The general-purpose Squeak developers listsqueak-dev@lists.squeakfoundation.org To: The general-purpose Squeak developers listsqueak-dev@lists.squeakfoundation.org Subject: Re: Design Principles Behind Smalltalk, Revisited Date: Sun, 31 Dec 2006 21:26:22 -0800
On Dec 30, 2006, at 9:09 AM, Jimmie Houchin wrote:
I've avoided RDBMS because I read a lot about the Object Relational mismatch in Squeak, Ruby, Python, etc. mailing lists. So how do I store my millions of objects, search and access them. I could easily store them in files and search via Swish-e. But managing millions of files in the file system is kludge. Ugh. So I've been thinking that I'm working harder on a kludge than it would be to learn SQL and use PostgreSQL.
So with that nudge from you, I sit at my desk right now reading one of my several SQL books. Thanks. :)
Put down the book.
You want to load up GLORP. It rocks. It is as easy to work with as an OODB, but much more flexible and is backed by PostgreSQL. Grab a copy of squeak, load the postgres client, then load up glorp. You're golden.
Except you need a meta model. You can write one in glorp, you can build one with a GUI like Apple's EOModeler - free with WebObjects. The EOGlorp package will let GLORP work off of your EOModel files. Once you have your meta model, glorp is just like working with objects. You write queries in Smalltalk like
aDatabase readOneOf: User where: [:user | user login = 'jhouchin'].
-Todd Blanchard
Tools like GLORP are very nice: they save you writing SQL directly. But look at your line of code: it is SQL in message form.
I wasn't talking about using embedded SQL in code. I was talking about the back end data store. IMO the data is often best modeled relationally. Then you can set up any views you want and then use something like GLORP to access it.
_________________________________________________________________ Find sales, coupons, and free shipping, all in one place! MSN Shopping Sales & Deals http://shopping.msn.com/content/shp/?ctid=198,ptnrid=176,ptnrdata=200639