MagmaCollections

Jimmie Houchin jhouchin at texoma.net
Thu Aug 14 20:46:05 UTC 2003


I am trying to learn how to use Magma and exploring its suitability for 
some projects. I am not a database expert. :)
So I may be naive in my understanding.

My first project I am creating a Bible database I have a text of the KJV 
I am storing line by line into the database. In the image I just used an 
OrderedCollection for each line and created a dictionary which held an 
index so that I could access via book:chapter:verse.

I made two attempts with Magma. The first committing the 32,201 item 
Ordered Collection and the 32,201 item Dictionary to the MagmaDB. Took 
forever. I left, went home, came back next day. The image was at 200mb, 
the MagmaDB was at 25mb for a 5mb text file. And it hose my computer and 
I had to restart. I may have done something wrong. :)

Last night I did a MagmaCollection for the 32,201 verses. The kjv.magma 
file is 6267kb the hdx file 14,081. Wow, is it normal for the hdx file 
to be so much larger than the other file? This time the image never grew 
past 40mb.

I stored KJVverse objects which only had a #verse and #verseIndex 
attributes.

I attempted to add an Index based on the #verseIndex with this:
KJVls is a local session to the database stored in the KJVls class variable.

createVerseIndex
(self KJVls root at: 'verses') addIndex:
       (MaSearchStringIndexDefinition
          attribute: #verseIndex
          keySize: 64)

This method appears to succeed but does nothing. No error, no index. :(
I copied it from the swiki and modified it.

I don't know what I'm doing wrong.

Any guidance, wisdom and help, greatly appreciated.

Jimmie Houchin



More information about the Squeak-dev mailing list