# Simple Object Relational Database? Ruby db40

**URL:** <https://www.ruby-forum.com/t/simple-object-relational-database-ruby-db40/139428>\
**Category:** Ruby\
**Created:** [June 3, 2008, 9:02pm UTC](https://www.ruby-forum.com/t/simple-object-relational-database-ruby-db40/139428 "2008-06-03T21:02:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Casimir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f17d59/32.png) [@Casimir](https://www.ruby-forum.com/u/Casimir)\
**Post date:** [June 3, 2008, 9:02pm UTC](https://www.ruby-forum.com/t/simple-object-relational-database-ruby-db40/139428/1 "2008-06-03T21:02:25Z")

</div>

I have built a _simple_ object store that runs on the local filesystem.

Object serialization (marshaling) and restoring details are pseudo  
automagical, serialized objects saved as binary object strings in text-  
files. A label is generated for indexing and metainformation.

You can save, search for words in label fields, and restore objects.

I implemented it by making all storable objects inherit from the  
storable-  
superclass. Least effort -principle. Far from a database.

Serialized objects are all stored in the same directory. After a few  
more  
thousand files I suppose directory size limits performance. And what  
about the relationships between the objects?

I want to learn more.

What laws dictate performance? How should filesystem\<-\>objects -mapping  
work? In effect, what kind of hierarchy and naming should, in your  
opinion, be used?

I realize its not that simple but where should I look for answers after  
I  
find the questions?

Casimir

---

<div class="post-metadata">

**Author:** ![Casimir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f17d59/32.png) [@Casimir](https://www.ruby-forum.com/u/Casimir)\
**Post date:** [June 3, 2008, 10:14pm UTC](https://www.ruby-forum.com/t/simple-object-relational-database-ruby-db40/139428/2 "2008-06-03T22:14:00Z")

</div>

On Jun 3, 2008, at 12:59 PM, Casimir wrote:

> I realize its not that simple but where should I look for answers  
> after I  
> find the questions?

are you aware of fsdb? it sounds remarkably like your project and is  
quite mature…

a @ [http://codeforpeople.com/](http://codeforpeople.com/)

---

<div class="post-metadata">

**Author:** ![Casimir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f17d59/32.png) [@Casimir](https://www.ruby-forum.com/u/Casimir)\
**Post date:** [June 3, 2008, 10:01pm UTC](https://www.ruby-forum.com/t/simple-object-relational-database-ruby-db40/139428/3 "2008-06-03T22:01:41Z")

</div>

On Tuesday 03 June 2008 13:59:20 Casimir wrote:

> Serialized objects are all stored in the same directory. After a few more  
> thousand files I suppose directory size limits performance.

A good filesystem makes this a moot point, unless you are deliberately  
looping  
through all of them. Even ext3 can be tuned for very large directories.

Use the filesystem structure that makes life easiest for you, and then  
figure  
out what filesystem performs best under it.

---

<div class="post-metadata">

**Author:** ![Casimir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f17d59/32.png) [@Casimir](https://www.ruby-forum.com/u/Casimir)\
**Post date:** [June 4, 2008, 12:07am UTC](https://www.ruby-forum.com/t/simple-object-relational-database-ruby-db40/139428/4 "2008-06-04T00:07:23Z")

</div>

Casimir wrote:

> I have built a _simple_ object store that runs on the local filesystem.

Sounds interesting, a bit like fsdb, but possibly with different goals  
and ideas. Keep us posted when you’ve got a release…
