[futurebasic] CF structures 101

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 2008 : Group Archive : Group : All Groups

From: Jay Reeve <jayreeve@...>
Date: Thu, 31 Jan 2008 02:11:09 -0600
Hi,

I've started studying the docs on CFstrings, CFarrays,  
CFDictionaries, CFCollections, etc. I'm thinking about trying to  
change a small program to the new types. I'd appreciate some very  
simple answers to some very basic questions...

Here's what I'm using now:

• 50,000 records in a random-access file on disk.
==> Would that best become a collection, an array, or something else?

• each 2,400-byte record has some 80 fields of varying lengths.
==> Would this best be a dictionary? Can you put dictionaries in an  
array?

• 30 of those fields are actually 10-element arrays of short strings  
(varying from 1-17 chars)
==> I assume these would be CF arrays. Can you put arrays into  
arrays? Into dictionaries?

• the remainder are other individual short strings. Some will be  
input only once; a few may be changed later
==> Can mutable and immutable elements reside in the same structure?

• some of the strings hold text representations of numbers, and could  
be stored as numbers
==> Aside from the field-length caveat, is there any reason not to  
convert them to CFnumbers?

• Many of the records contain matching fields. One of my goals in  
making the switch is to reduce the 170 mb disk footprint.
==> Is CF likely to do that?

I know there's a wealth of knowledge out there about a wealth of  
information. I'm just looking for some simple pointers and  
suggestions for getting started. How would some of you more  
experienced CFers structure this?

TIA,
   e-e
   =J= a  y
    "