Re: [SQLObject] Joins/FKs with bad IDs
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Luke O. <lu...@me...> - 2003-05-19 06:39:50
|
> [As an aside, I'm not quite convinced that using Python to express where > clauses, etc. is better, since you have to work much harder to deduce > the underlying SQL constructs when debugging. But, I'm still mulling > this over.] I am also still weighing this. The clumsiness needed for the AND() and OR() problems, and that there really aren't a lot of 'hard' clauses I've had that are easier to manage in python instead of SQL make me avoid it. I think it may be more helpful/relevant/(necessary?) when SQLObject supports more abstracted toSQL/fromSQL actions for columns, but for now sqlEncode or whatever it's called is just as easily used to make an SQL string manually that any developer can read. > > I'm in the midst of re-reading CJ Date's "What not How", > > which applies so directly to this issue... tangentially, I'm also leaning > > towards the suggestion of supporting nested types, ala the Point example, > > although I need to think it through for myself... > > Don't forget to check out http://www.pgro.uk7.net/index.htm It has lots > of stuff by Date, Pascal, etc. They do take an extremist, theoretic view > of the world, but maybe more rigor is needed given how many people seem > to equate MySQL and Access with PostgreSQL, Oracle, DB2, etc. > > Is the book worth a read? yep, I try to read dbdebunk.com every once in a while, although it's become a lot of repititious Pascal whining about normalization than the stuff that really interests me (although I do take it as a matter of fact that you have to have a really freaking big proven reason to denormalize in any database I have say over. This gets to a point Date makes occasionally about most SQL products' base tables being equal to implementation, when they ought to be as abstract from implementation (conceptually at least) as views are from base tables. Anyways... Yes, I think the book is worth a read, although it's expensive and short, and if you already know Date's views then half the book is a refresher. Also, definitely could have used some more structural editing (a lot of "Oh and this is relevant, but I'll talk about it in these other two chapters so forget I said it.") I found Third Manifesto to be much more worthwhile, and it covers most of the constraint arguments here. The one value I've really gotten out of What Not How is that it's so short, and introduces concepts like relvar vs relation as sidenotes, that it's a very handy book to pass off to co-workers etc to make a point. Most people won't read Third Manifesto, or care, but this is very conversational and short. :) - Luke |