[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how is data loaded into ozone



On Wed, 08 Nov 2000, Alison Eyth wrote:
> Hi Falko,  
> 
> Thanks for answering my questions about ozone.  I have another follow-on 
> question regarding how the system "loads in objects" - by this I mean
> how much of the objects are loaded into memory?  
> 
> e.g. Suppose I have a collection of objects of a certain class that
> are stored to the database.  I want to present a list of the names
> of the objects to the user, have them pick one or more, then retrieve
> the selected objects.  
> 
> If I keep the objects together in a collection, then to present the
> list of names, does each object get loaded into memory in its entirety?
> Does ozone buffer the objects somehow?  Or, can it detect that I'm only
> accessing the name field and load only that part into memory?  (Some
> commercial dbs claim to be able to detect the parts of the object that
> are referenced and load only those into memory).  We are concerned about
> this because we may have hundreds or thousands of objects that we may
> need to get a small piece of information about and choose from them.
> 
> Also, I remember you said that "Java is the query language".  So, if
> I had a collection of objects to query from, should I store them 
> individually in the database or as a collection?  If I store the
> whole collection, does the whole thing get loaded into RAM to do the 
> query?  (This is a similar, but slightly different case than the above).

Did you read the docs and/or played with the samples?

Anyway, here is (again) a short overview. Get back with your concrete
questions.

ozone is build on a single instance architecture. The database objects never
leave the server. They are activated and invoked inside the server only. They
are controlled by the client (or other database objects) via proxy objects. Of
course the server keeps a LRU cache of database objects.

"Database objects" are different from ordinary Java objects. (other systems
and specs, like JDO, call them "primary" and "secondary") They can be directly
addressed (used) via proxies from the client. In fact database objects are sets
of ordinary objects. For example the class "Car" contains several String members
which are objects. One object of type Car and the dependent Strimg members is a
database object. Database objects are loaded into memory as a whole when
somwone is invoking a method on them. In fact, when someone is invoking a
method on one of the proxies of an actual database object.

So, the clear answer to your questions is: It depends. ;) If your collections
contains database objects, then the members are loaded when they are actually
needed. If the collection contains ordinary Java objects then the entiry things
gets loaded.


Falko
-- 
______________________________________________________________________
Falko Braeutigam                              mailto:falko@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com