# Cool way to save big object tree

**URL:** <https://www.ruby-forum.com/t/cool-way-to-save-big-object-tree/51261>\
**Category:** Ruby\
**Created:** [December 28, 2005, 9:50pm UTC](https://www.ruby-forum.com/t/cool-way-to-save-big-object-tree/51261 "2005-12-28T21:50:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_SentropieS\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/6de8d8/32.png) [@Michael\_SentropieS\_S](https://www.ruby-forum.com/u/Michael_SentropieS_S)\
**Post date:** [December 28, 2005, 9:50pm UTC](https://www.ruby-forum.com/t/cool-way-to-save-big-object-tree/51261/1 "2005-12-28T21:50:23Z")

</div>

Peace!

I’am trying to code a ‘litle’ music enviroment… huh, dunno how to  
call.  
I want to import a large amount of files(30k+) into a database and tag  
each  
of them.

After a import i get objects for each directory (first only  
directories), with some variables  
(@rel referes to the parent directory node).  
It looks like this: [1]

I want to save each of those objects somehow nice (first only the tags:  
‘category’, ‘bitrate’, ‘path’)…  
After the intial import, i want to extend the tags.  
Later there are many tags, many files with compley queries  
so i get now a bit scared to save all in a directory tree.

Maybe anybody has an better idea?

ID:DIR\_LVL::name

[1] (human eye obj.inspect)

- 00025:3::the streets - mixtape {
- (@rel =
- 

```
00022:2::the streets {

```

- 

```
  (@rel =

```

- 

```
    00021:1::garage {

```

- 

```
      (@rel =

```

- 

```
        00000:0::root {

```

- 

```
          (@name = root );

```

- 

```
          (@path = /mnt/hdd/music );

```

- 

```
          (@lvl = 0 );

```

- 

```
        } => MyBiadjDBReader::MyBiadjBase );

```

- 

```
      (@name = garage );

```

- 

```
      (@frkyCntr = 21 );

```

- 

```
      (@ctype = muse );

```

- 

```
      (@path = garage );

```

- 

```
      (@lvl = 1 );

```

- 

```
    } => MyBiadjDBReader::MyBiadjCat );

```

- 

```
  (@name = the streets );

```

- 

```
  (@frkyCntr = 22 );

```

- 

```
  (@ctype = muse );

```

- 

```
  (@path = the streets );

```

- 

```
  (@lvl = 2 );

```

- 

```
} => MyBiadjDBReader::MyBiadjArtist );

```

- (@name = the streets - mixtape );
- (@frkyCntr = 25 );
- (@ctype = muse );
- (@path = the streets - mixtape );
- (@lvl = 3 );
- } =\> MyBiadjDBReader::MyBiadjVinyl  
[1]

## So long

Michael ‘entropie’ Trommer; [http://ackro.org](http://ackro.org)

ruby -e “0.upto((a=‘njduspAhnbjm/dpn’).size-1){|x| a[x]-=1}; p  
‘mailto:’+a”
