Re: [Zope-dev] Experiments with ORMapping

2001-05-15 Thread Shane Hathaway
On Mon, 14 May 2001, ender wrote: i want to thank DC (jim, shane, and paul) for inviting me to come to the new DC offices. i had a great time and learned a bunch... and met the BFDL. It was good to talk with you! i gave a quick overview of the smartobjects design/framework and jim and

Re: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-14 Thread Mail List
From: Joachim Werner [EMAIL PROTECTED] This is true in the ZODB, but can be complicated by acquisition. If an object can acquire itself, it can cause issues. Plus it becomes difficult to know whether objects are clones or just identical instances, although this can be mitigated by

Re: [Zope-dev] Experiments with ORMapping

2001-05-14 Thread Shane Hathaway
Phillip J. Eby wrote: At 05:42 PM 5/11/01 -0400, Shane Hathaway wrote: Phillip J. Eby wrote: I'm not quite clear on how exactly you suggest mapping from RDMBS - ZODB. There's a *significant* (IMHO) impedance mismatch between ZODB's arbitrarily identified variably structured single

Re: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-14 Thread Shane Hathaway
Joachim Werner wrote: Probably I'm daft because it is Friday night, but AFAIK ZODB and most OODB's store an object only once, keyed by its object id. The rest is just references through that oid, so objects that belong to more than one container can be added to all these containers

Re: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-14 Thread Jeff
From: Joachim Werner [EMAIL PROTECTED] This is true in the ZODB, but can be complicated by acquisition. If an object can acquire itself, it can cause issues. Plus it becomes difficult to know whether objects are clones or just identical instances, although this can be mitigated by

Re: [Zope-dev] Experiments with ORMapping

2001-05-14 Thread Chris Withers
Shane Hathaway wrote: I'm telling you there's a lot more you can do with the code that makes snip The next thing to do is to write a fishbowl proposal. This sounds cool but made my head hurt :-S Can you try and bring this back down to the level of us mere mortals by explaining how your OR

Re: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-14 Thread Juan David Ibáñez Palomar
P.S.: Shane, have you developed Symlinks any further? I think they could be extremely useful. I tried out the initial release and liked it, except for the fact that the symlinks looked EXACTLY like real ones, so they can be very irritating ... I'm not sure what to do with symlinks.

Re: [Zope-dev] Experiments with ORMapping

2001-05-14 Thread Shane Hathaway
Chris Withers wrote: Shane Hathaway wrote: I'm telling you there's a lot more you can do with the code that makes snip The next thing to do is to write a fishbowl proposal. This sounds cool but made my head hurt :-S Can you try and bring this back down to the level of us mere

Re: [Zope-dev] Experiments with ORMapping

2001-05-14 Thread Chris Withers
Shane Hathaway wrote: One would define an ObjectMappingSchema whose job it is to store and retrieve objects of a specific type and in a specific location. It would usually grab a database connection object to do its work. When loading, it would perform a query then manually put

Re: [Zope-dev] Experiments with ORMapping

2001-05-14 Thread John D. Heintz
I think this is a great idea! I would definetely like to use and contribute to this effort. Having this kind of flexibily would be fantastic. After demonstratable Python code is working I would request that usability issues (UI Schema mapper, data migration/schema evolution tools, ZEO

Re: [Zope-dev] Experiments with ORMapping

2001-05-14 Thread Shane Hathaway
Chris Withers wrote: Shane Hathaway wrote: One would define an ObjectMappingSchema whose job it is to store and retrieve objects of a specific type and in a specific location. It would usually grab a database connection object to do its work. When loading, it would perform a query

Re: [Zope-dev] Experiments with ORMapping

2001-05-14 Thread Chris Withers
Shane Hathaway wrote: ZPatterns implements storage logic on the application level. Applications have to be aware of (in fact they have to be centered around) ZPatterns. This alternate approach keeps storage logic independent of application logic. It lets you take any code written for the

Re: [Zope-dev] Experiments with ORMapping

2001-05-14 Thread John D. Heintz
A way to approach how this would be useful would be to contrast different use environments for ZODB code. The same code could be used for: - Unit testing, prototyping, and general exploration could use ZODB with DemoStorage and the default Connection objects. - Production use could make use

Re: [Zope-dev] Experiments with ORMapping

2001-05-14 Thread Shane Hathaway
Chris Withers wrote: Shane Hathaway wrote: ZPatterns implements storage logic on the application level. Applications have to be aware of (in fact they have to be centered around) ZPatterns. This alternate approach keeps storage logic independent of application logic. It lets you

Re: [Zope-dev] Experiments with ORMapping

2001-05-14 Thread Phillip J. Eby
At 12:26 PM 5/14/01 -0400, Shane Hathaway wrote: Chris Withers wrote: Shane Hathaway wrote: One would define an ObjectMappingSchema whose job it is to store and retrieve objects of a specific type and in a specific location. It would usually grab a database connection object to

Re: [Zope-dev] Experiments with ORMapping

2001-05-14 Thread Shane Hathaway
Phillip J. Eby wrote: All this is of course just my opinion, and quite possibly wrong. But I think that an application developer would get more mileage out of your DBAPI product (coupled with some utility classes to replace Racks) or from ZPatterns than they would from this approach to O-R

Re: [Zope-dev] Experiments with ORMapping

2001-05-14 Thread Joachim Werner
Now, it may be useful to provide a management interface for defining the schema mapping. I haven't approached that yet; AFAICT this is where the work done on SmartObjects and DBObjects would be very useful. Initially I was planning for people to code the mapping purely in Python so we

Re: [Zope-dev] Experiments with ORMapping

2001-05-14 Thread Joachim Werner
My thought on this, is that you will be forced to explicitly consider the nature of this relationship and its storage at the application level. If you write explicitly for ZODB, you might use a BTree, for example. Or perhaps you'd have some kind of global container for the Tasks, with a

Re: [Zope-dev] Experiments with ORMapping

2001-05-14 Thread Joachim Werner
My thought on this, is that you will be forced to explicitly consider the nature of this relationship and its storage at the application level. If you write explicitly for ZODB, you might use a BTree, for example. Or perhaps you'd have some kind of global container for the Tasks, with a

Re: [Zope-dev] Experiments with ORMapping

2001-05-14 Thread ender
Hello, i want to thank DC (jim, shane, and paul) for inviting me to come to the new DC offices. i had a great time and learned a bunch... and met the BFDL. i gave a quick overview of the smartobjects design/framework and jim and shane presented some ideas for an or mapping for the zodb. to

Re: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-13 Thread Joachim Werner
This is true in the ZODB, but can be complicated by acquisition. If an object can acquire itself, it can cause issues. Plus it becomes difficult to know whether objects are clones or just identical instances, although this can be mitigated by exposing their Python instance id. Acquisition

Re: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-13 Thread Joachim Werner
Probably I'm daft because it is Friday night, but AFAIK ZODB and most OODB's store an object only once, keyed by its object id. The rest is just references through that oid, so objects that belong to more than one container can be added to all these containers and n:m relations are

Re: [Zope-dev] Experiments with ORMapping

2001-05-12 Thread Phillip J. Eby
At 05:42 PM 5/11/01 -0400, Shane Hathaway wrote: Phillip J. Eby wrote: I'm not quite clear on how exactly you suggest mapping from RDMBS - ZODB. There's a *significant* (IMHO) impedance mismatch between ZODB's arbitrarily identified variably structured single records and SQL's

Re: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread Cees de Groot
Shane Hathaway [EMAIL PROTECTED] said: That's one reason ZODB is so nice. You can write an application without writing a formal schema. One of the reasons I am seriously considering to migrate our production database from PostgreSQL to ZODB. I am about to implement our product database, and it

Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread Chris Withers
Shane Hathaway wrote: Kapil gave Jim and I a good introduction to SmartObjects yesterday. So far, it seems a lot like ZPatterns in that it mandates a new database access API rather than trying to be transparent like ZODB. The other is TransWarp, which has a slightly different focus, but

Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread Joachim Werner
Hi! Do you know that there already is a project for OR-Mapping in Zope (actually there are two ...)? Yes, and I think the projects need to look into replacing parts of ZODB rather than adding complexity. ZODB has pieces that can be split apart and replaced as needed, such as caching,

Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread Joachim Werner
So, if I had a.n.other SQL table containing some attributes, how would you see that mappign to Zope objects? What meta_type would they be? Where would they show up? That's why we need an API and can't just do everything transparently ;-) We have the conept of SmartAttributeSheets (names

Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread Joachim Werner
But storage of binary pickles was never the intention anyway. I created a little interface that would allow you to store different classes in different PostgreSQL tables. Before I got to implementing anything, Is this much like the ZPatterns approach? Which part of ZPatterns are

Re: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread Joachim Werner
The other motivations for an RDBMS are (1) people have existing schemas and want Zope to access the same data as their existing apps, and they want it to be transparent, and (2) tables with millions of entries are easily stored in Zope but the perception is that the catalog isn't as fast as

Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread Shane Hathaway
Joachim Werner wrote: Hi! Do you know that there already is a project for OR-Mapping in Zope (actually there are two ...)? Yes, and I think the projects need to look into replacing parts of ZODB rather than adding complexity. ZODB has pieces that can be split apart and

Re: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread Casey Duncan
Cees de Groot wrote: Shane Hathaway [EMAIL PROTECTED] said: That's one reason ZODB is so nice. You can write an application without writing a formal schema. One of the reasons I am seriously considering to migrate our production database from PostgreSQL to ZODB. I am about to implement

Re: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread David Brown
At 11:45 AM 5/11/2001 -0600, Casey Duncan wrote: One of the biggest limitations in my mind is the lack of a general query language for the ZODB like what you get with most OODBMS and all RDBMS. I used to think this as well. But isn't Python a decent query language? Isn't it nice to be able to

Re: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread Joachim Werner
But isn't Python a decent query language? Isn't it nice to be able to have all of the facilities of Python at your disposal when manipulating data, rather than hoping that whatever database you are using doesn't have a brain-damaged implementation of SQL? Most of the time nobody will need

Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread Joachim Werner
It sounds like you are tackling a lot of things at once. You might consider dividing into separate projects. Yep, that's what is happening right now. We are still collecting feature requests. Then we will sort them out. A lot of the stuff will also be useful in different contexts than we have

Re: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread David Brown
At 08:38 PM 5/11/2001 +0200, you wrote: E.g. how would you handle objects beloning to more than one container? In SQL this is easy (Just have a table that matches key pairs from the container table and the item table). I could do the same thing with Python, creating a dictionary that does

Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread Phillip J. Eby
At 11:01 AM 5/11/01 -0400, Shane Hathaway wrote: Joachim Werner wrote: The current design plans of SmartObjects are mainly based on the assumption that we will not be able to change Zope itself. This is not a dogma for us, however. I guess doing OR-mapping in the Zope core would be fine

Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread Shane Hathaway
Phillip J. Eby wrote: At 11:01 AM 5/11/01 -0400, Shane Hathaway wrote: Joachim Werner wrote: The current design plans of SmartObjects are mainly based on the assumption that we will not be able to change Zope itself. This is not a dogma for us, however. I guess doing OR-mapping in

Re: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread Cees de Groot
Joachim Werner [EMAIL PROTECTED] said: [...]. E.g. how would you handle objects beloning to more than one container? In SQL this is easy (Just have a table that matches key pairs from the container table and the item table). And I don't know any good way of implementing many-to-many relations in

Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread Cees de Groot
Phillip J. Eby [EMAIL PROTECTED] said: For example, if I am an ISP, and I want to implement an active flag on an account object, I would like changing it to automatically go out and add or remove routing entries and password entries on my servers when I update the record through my Zope

Re: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread Casey Duncan
Cees de Groot wrote: Joachim Werner [EMAIL PROTECTED] said: [...]. E.g. how would you handle objects beloning to more than one container? In SQL this is easy (Just have a table that matches key pairs from the container table and the item table). And I don't know any good way of

Re: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread Cees de Groot
[EMAIL PROTECTED] said: This is true in the ZODB, but can be complicated by acquisition. Cheap cop-out: I was planning to avoid acquisition in my business object database (which will be a database separate from the Zope ZODB). Personally, I'm not very convinced of the necessity and

[Zope-dev] Experiments with ORMapping

2001-05-10 Thread Shane Hathaway
Kapil (and others), Although very sketchy and I can't guarantee anything works, my experiments with object-relational mapping in Zope are found at http://www.zope.org/Members/hathawsh/ormapping.tar.gz . If ORMapping.py is in the ZODB directory, you can use the following custom_zodb.py to run

Re: [Zope-dev] Experiments with ORMapping

2001-05-10 Thread Tino Wildenhain
Hi Shane, --On Donnerstag, 10. Mai 2001 11:32 -0400 Shane Hathaway [EMAIL PROTECTED] wrote: ... But storage of binary pickles was never the intention anyway. I created a little interface that would allow you to store different classes in different PostgreSQL tables. Before I got to

Re: [Zope-dev] Experiments with ORMapping

2001-05-10 Thread Shane Hathaway
Tino Wildenhain wrote: But storage of binary pickles was never the intention anyway. I created a little interface that would allow you to store different classes in different PostgreSQL tables. Before I got to implementing anything, Is this much like the ZPatterns approach? Which part

oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-10 Thread Tino Wildenhain
Hi shane, I think the motivation people want an RDBMS storage beneth zodb is because they understand RDBMSes these days are performant, relieable and can quiete easy maintained. I've seen Java implementations using this approach to achive persistens using as example Powertier[tm] to explicit

Re: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-10 Thread Shane Hathaway
Tino Wildenhain wrote: I think the motivation people want an RDBMS storage beneth zodb is because they understand RDBMSes these days are performant, relieable and can quiete easy maintained. The other motivations for an RDBMS are (1) people have existing schemas and want Zope to access the

Re: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-10 Thread Casey Duncan
Tino Wildenhain wrote: Hi shane, I think the motivation people want an RDBMS storage beneth zodb is because they understand RDBMSes these days are performant, relieable and can quiete easy maintained. I've seen Java implementations using this approach to achive persistens using as

Re: [Zope-dev] Experiments with ORMapping

2001-05-10 Thread Joachim Werner
You know, it might be possible to get a team together to implement this. How many out there would be interested in pursuing it further? IMHO it's not as much work as it sounds at first. Zope being so object-oriented, you really can replace one of its most fundamental assumptions (an

Re: [Zope-dev] Experiments with ORMapping

2001-05-10 Thread Shane Hathaway
Joachim Werner wrote: You know, it might be possible to get a team together to implement this. How many out there would be interested in pursuing it further? IMHO it's not as much work as it sounds at first. Zope being so object-oriented, you really can replace one of its most