Home All Groups Group Topic Archive Search About

Quickie data storage question

Author
18 Oct 2005 1:50 PM
MP
Looking for advise on a quick and dirty data storage technique
I probably should be using a database for this but don't know enough about
ado to just
whip one up right now and don't have time for a major research project to
get
this working.
For that reason I'm using a scripting.Dictionary
I'm wondering if it is highly inefficient memory or speed wise to use
multiple layers
of dictionaries inside each other to store various data

an example of my problem scope:

Data to store & retrieve
Name | Quantity

I'm using a Scripting.Dictionary to collect all items with matching "name"
and doing a count by incrementing the item field.

In "DictionaryLevelOne"
Key:Name
Item:Quantity

this part works and was quick and easy to implement.
but now I want to expand the data associated with "name" to include more
topics

Name | Quantity | Length | FileName | Possible future characteristics

I could use another Scripting.Dictionary inside the first to store these
eg:

In "DictionaryLevelOne"

Key: "Name"
Item: DictionaryLevelTwo
In "DictionaryLevelTwo"
  Key: "Quantity:
  Item: QtyValue
  Key: "Length"
  Item: lengthValue
  Key: "FileName"
  Item: sFileName
  etc
  etc

Is this a terribly stupid way to handle an immediate need until I can learn
enough about
databases to be able to implement a more intelligent design?

Any other quick ways
or is an ado solution not that hard to learn?

Thanks
Mark

Author
18 Oct 2005 4:20 PM
J French
On Tue, 18 Oct 2005 13:50:14 GMT, "MP" <nospam@Thanks.com> wrote:

>Looking for advise on a quick and dirty data storage technique
>I probably should be using a database for this but don't know enough about
>ado to just
>whip one up right now and don't have time for a major research project to
>get
>this working.

Data storage is a 'Black Art'
- unless one approaches it in the old and simplistic way
Author
18 Oct 2005 5:23 PM
MP
Show quote Hide quote
"J French" <erew***@nowhere.uk> wrote in message
news:43551fd5.271116464@news.btopenworld.com...
> On Tue, 18 Oct 2005 13:50:14 GMT, "MP" <nospam@Thanks.com> wrote:
>
> >Looking for advise on a quick and dirty data storage technique
> >I probably should be using a database for this but don't know enough
about
> >ado to just
> >whip one up right now and don't have time for a major research project to
> >get
> >this working.
>
> Data storage is a 'Black Art'
> - unless one approaches it in the old and simplistic way
>
>


sorry, that was probably a bad term to use,
the data "storage" is just temporary runtime storage while iterating over
sets of
files and extracting data as required.
as opposed to permanent storage to disk
in either case I'm afraid I don't understand your cryptic reply
don't know what you mean by "old and simplistic"
"simplistic" is definitely what I'm aiming for at the moment.

in respect to my orig. post, the other way I thought of to store the
multiple "fields" would be an array instead of a dictionary...probably more
efficient
the advantage to me of a dictionary with keys is merely self documenting
code by using the key name to describe the kind of data I'm storing
there...probably a very inefficient way of keeping track of what i'm doing.
I could just do
array(0) = nameVal
array(1) = countVal
array(2) = lengthVal
etc and just keep comments in the code to remember which entries are which
i suppose...
Show quoteHide quote
:-)
Mark