From: Andy T. <an...@ha...> - 2003-11-11 10:07:22
|
John Baker wrote: > On Monday 10 November 2003 21:54, Ian Bicking wrote: > > [snip] > > There's no reason why they can't be aware, in the form of a "key" column. But > stop worrying about that, you're writing an object storage system. The person > writing objects to map to a database shouldn't and won't care about all of > this. They shouldn't even have to know SQL, all they care about is using a > system that persists objects. > > In a perfect world, the system of storage is irrelevant to the person writing > the code. Files/SQL/ObjectDatabases/SmokeSignals/Pigeons. It doesn't matter, > the magic should be nothing more than a transparent interface to storage and > retrieval, without them having to worry about "not being able to do this > because the mapping tool doesn't support superset mappings". > > I realise the world isn't perfect. :) > [snip] > <rant> I'm not. I'm writing an application which stores its data in a relational database but which is written in an object oriented style. If I wanted an object persistence mechanism I'd use something like ZODB or PyPerSyst. This is something that irks me when working with colleagues who have limited exposure to technologies other than, for instance, Java. They are always in conflict with their DBAs (who do still exist btw) justifying data models where one side is simply using the db as a persistence mechanism and the other is trying to use the database 'properly'. In general, the right solution is somewhere in the middle. Some of the more esoteric object associations don't map nicely to databases and code has to be written in your application to accomodate them. Likewise you can't always have a third normal form relational model in your database, sometimes you have to live with a little duplication or non-optimal storage structures to make the application easier to code. Its all about compromise </rant> Sorry about that, but *I* feel better now. Regards, Andy -- -------------------------------------------------------------------------------- From the desk of Andrew J Todd esq - http://www.halfcooked.com/ |