[Q]Populating magma with a large tree

Martin Drautzburg martin.drautzburg at web.de
Sat Aug 30 11:13:27 UTC 2003


These are probably simple ones, but I could not quite figure them out.

I want a magma database with consists of tree nodes, each referencing
its single superior and a collection of subordinates. I can build that
tree in memory (with a recursive algorithm) and then commit the root
object, which will create the database I want. I can then remove all
references to the root object in memory and all tree nodes will be
garbage collected. Then I can read the magma database and tree nodes
will materialize on demand. No proboem so far.

But I want the magma database to be much larger than what I ever want
to hold in memory. How can that be done ?

Another related issue I don't quite understand is the following: if I
want an index on the tree nodes I have to add them to a
MagmaCollection, right ? Suppose I have the database built and no
object is currently in memory. Then i manage to materialize one tree
node (assume it is a leaf) and delete it. I will have to remove it
from the MagmaCollection too, right ? But is it in there at all ? I
could have materialized the leaf object by traersing the tree from the
root object without ever using the index.



More information about the Squeak-dev mailing list