From: | M(dot)Feldtmann(at)t-online(dot)de (Marten Feldtmann) |
---|---|
To: | "Chris Bitmead" <chrisb(at)nimrod(dot)itg(dot)telstra(dot)com(dot)au>, "Marten Feldtmann" <marten(at)toppoint(dot)de> |
Cc: | "pgsql-hackers(at)postgreSQL(dot)org" <pgsql-hackers(at)postgresql(dot)org>, "pgsql-oo(at)postgreSQL(dot)org" <pgsql-oo(at)postgresql(dot)org> |
Subject: | Re: Alternative new libpq interface. |
Date: | 2000-07-11 06:14:34 |
Message-ID: | 13BsDG-0xEwFsC@fwd02.sul.t-online.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, 11 Jul 2000 11:05:04 +1000, Chris Bitmead wrote:
>
>Each programming language has a specified ODMG interface. Database
>objects are mapped 1:1 with language objects. Every time you read
>a database object a language object is created to represent it.
>
Ok, this is defined as the language bindungs mentioned in this
book.
>Now if you read the same database object in different places in your
>code. Maybe the same object is "navigated" to via different paths,
>you don't want two objects created in memory to represent that object.
>If that happened you could have a confusing integrity situation.
>
>So with an ODMG interface it keeps track of what database objects
>are in memory at any one time - think of it as a cache, and makes
>sure that if you request the same object again, it doesn't construct
>a new one but returns the existing one.
>
Hmmm, what you want is not that easy. It means, that the object
data is stored several times on the client:
- you MUST hold an independent cache for each open connection
to the database.
- you MUST copy the values from the cache to the language
dependent representation.
And you still do not get the result you want to have: the
integrity problem. What happens, if the cache is not big
enough. How are cached objects thrown away ? Garbage Collector
in the cache system ??
And another point: this has nothing to do with an ODMG interface.
It's just a nice performance hint for database access, but
ODMG has nothing to do with it.
Normally the identity is assured by the language binding - either
by the database (as you would like it) or by the binding of a
particular language to this database.
To get an ODMG language binding you may use the libpq. You may
put a cache system on top of this libpq and you have the thing
you perhaps want to have. That's all you really need.
What indeed would be a big win, it the chance to retrieve different
result sets with one query !
Marten
----
Marten Feldtmann, Germany
From | Date | Subject | |
---|---|---|---|
Next Message | Philip Warner | 2000-07-11 06:37:13 | Re: postgres 7.2 features. |
Previous Message | Tim Perdue | 2000-07-11 06:00:30 | Re: Article on MySQL vs. Postgres |