Re: [SQLObject] two postgres questions
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Bud P. B. <bu...@si...> - 2003-05-20 08:48:38
|
> Actually, I don't consider my db models to be legacy models... "legacy" > kind of implies "out of date", "mainframe", etc. I agree that "legacy" isn't a good term. What I meant is really a pre-existing data schema that has to be accesses (in contrast to one that is newly created following the needs of the middleware). I believe that the biggest issue I see here is that of the object ID. Both SQLObject and my experiments create an additional OID that was not declared in the mapping. Both allow to chose the name, but (I believe???) not the type of that field. Do you see a strong need to live without such an OID? Is it possible to retrofit pre-existing schemas with such an OID field? > It seems to me that (1) is best served by ZODB, (2) is where the ORMs > and SQLObject are, and (3) is where people like me are, but would prefer > not to be. I'm wondering what can (theoretically) be done and where, if they exist, are difficulties. OID is one that I see. Besides this, I believe that (what Postgresql calls) constraints should be quite straight forward to add. I already declare foreign keys all the way. While I haven't implemented it yet, I believe it to be easy to add things such as CHECK constraints, multi-field UNIQUE constraints, etc. I also plan to add the declaration of INDICES. I haven't thought of constraints that involve multiple tables. But off hand it doesn't seem difficult either. Is this what you need or is there more to it? > > What about a middleware layer who usually does the first solution but > > doesn't block you from doing the third? Would that be useful or does > > anyone see a strong need for the middle solution? > > I would have loved to have used SQLObject or some other alternative. I > looked at MiddleKit, dbObj, etc. But, none of these tools made it easy > to do complex data models. I would believe that a concrete example would be the best way of understanding each other. I admit to have difficulties to fully understand the situation so far. I tried to make it more concrete above what I have understood about constraints. I still have only a vague understanding of the multiple joins... Can you enlightern me a little more? best cheers --bud |