473,406 Members | 2,849 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

loading objects from ZODB

Hi,

I'm playing around with ZODB but I don't understand when objects are loaded
from the DB. Assume I have an object containing a list of other objects. If
this object is loaded from ZODB, when is the list filled? Only on demand? I
think yes, because otherwise reading the top node would result in loading
the whole database. But I wanted to be sure!

regards,
Achim
Jul 18 '05 #1
2 1626
"Achim Domma" <do***@procoders.net> a écrit dans le message de news:
be*************@news.t-online.com...
Hi,

I'm playing around with ZODB but I don't understand when objects are loaded from the DB. Assume I have an object containing a list of other objects. If this object is loaded from ZODB, when is the list filled? Only on demand? I think yes, because otherwise reading the top node would result in loading
the whole database. But I wanted to be sure!

regards,
Achim


It seems you don't need to care about this. The persistence of objects is
(almost) transparent.
You get/set the objects through a transparent cache to the database.
The only rule : all objects must be picklable, and watch the doc about
_v_xxx and p_xxx attributes.

--Gilles

Jul 18 '05 #2
"Gilles Lenfant" <gl******@NOSPAM.bigfoot.com> writes:
"Achim Domma" <do***@procoders.net> a écrit dans le message de news:
be*************@news.t-online.com...
I'm playing around with ZODB but I don't understand when objects are loaded
from the DB. Assume I have an object containing a list of other objects. If
this object is loaded from ZODB, when is the list filled? Only on demand? I
think yes, because otherwise reading the top node would result in loading
the whole database. But I wanted to be sure!

BTrees (OOBTree, IOBTree, OITree, IITree) load contained objects on
demand, most other data structures (including PersistentList and
PersistentMapping) don't.

It seems you don't need to care about this. The persistence of objects is
(almost) transparent.
You get/set the objects through a transparent cache to the database.
The only rule : all objects must be picklable, and watch the doc about
_v_xxx and p_xxx attributes.


That's not the only rule. Documentation is thin, of course. Andrew
Kuchling's intro is required reading, as is Jim Fulton's (though the
latter is particularly out of date, IIRC). There is some useful info
on BTrees and associated data structures on the Zope wiki.
John
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Richard Shea | last post by:
Hi - I'm trying to use ZODB but I'm having trouble getting started. Can anyone point me at a very simple example ? I've had a look at 'ZODB/ZEO Programming Guide'...
16
by: Paul Rubin | last post by:
I've had this recurring half-baked desire for long enough that I thought I'd post about it, even though I don't have any concrete proposals and the whole idea is fraught with hazards. Basically...
6
by: Almad | last post by:
Hello, I'm going to write a custom CMS. I'd like to use some odbms, as code is then much more cleaner...however, i'm a little bit scared about capabilities of ZoDB, when compared with f. e....
10
by: ls | last post by:
Hi All, I looking for help with ZODB data export to text file. I have file Data.fs (file becomes from Plone CMS) and I have to display content structure, data like intro, body of article, etc...
3
by: kyle.tk | last post by:
So I have a central list of python objects that I want to be able to share between different process that are possibly on different computers on the network. Some of the processes will add objects...
1
by: Harald Armin Massa | last post by:
Hello, I am using ZODB "standalone" in version 3.3.1 within some application. Now I learn that the 3.3.x branch of ZODB is "retired". No problem so far, everything is running fine. BUT......
3
by: Rene Pijlman | last post by:
I have a productional Linux web server with a Python/Zope/Plone. Now I'd like to install a non-Zope Python/ZODB application on the same server. What is the recommended way of doing that? Option...
2
by: Petra Chong | last post by:
Hello all I am using Python 2.3 and ZODB (without the rest of Zope) with the following pattern: * One process which writes stuff to a ZODB instance (call it test.db) * Another process which...
10
by: nayden | last post by:
I started playing with python a few weeks ago after a number of years of perl programming and I can say that my first impression is, unsurprisingly, quite positive. ;) The reason I am writing here...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.