SPOOD

Simplest Possible Object Oriented Database

Key features of SPOOD are:

SPOOD can work with multiple unrelated data sets. That data sets will be called “databases” from now on. Databases are stored in separate files in SPOOD snapshots directories. Database name is the same as name of the file where it is stored.

Database can consist of values and objects. Values are always strings. Those strings are byte-safe, so you can store any kind of data in them. Even jpg or executable files. Objects are collections of values and/or other objects. Every object and value has some “key” associated with it. Key is just another string.

Example data file ‘clients’ may look like this:

person 39cx3 {  
       firstname: Xxx  
       surname: Yyy  
       service s34ds {  
                type: something  
                price: 10  
       }  
       service kjj43 {  
                type: something else  
                price: 11  
       }  
}  
person j34j3 {  
        firstname: Zzz  
        surname: Aaa  
        service ddff4 {  
                type: something else  
                price: 11  
        }  
}

As you see, every key has to end with “:”.

Every DML command must be run within transaction boundary. Transaction is started with INIT command, e.g.:
INIT READS clients
That will return transaction identifier looking somewhat like this: 000023

Then you can query database like this:
IN 000023 ON 'clients' SELECT '/person';
This will return:
'39cx3','j34j3'
Those are identifiers of all ‘person’ objects in ‘clients’ database.

You can also do:
IN 000023 ON 'clients:39cx3','clients:j34j3' SELECT '/person/service/type:','/person/service/price:';
This will return:
'something','something else'|'10','11';'something else'|'11'

You can commit transaction with:
COMMIT 000023;
or abort it with:
ABORT 000023;

All returned values are prefixed with:
”+ ” if command succeeded
”- ” with problem description if command failed

COMMANDS SUMMARY:

commands that can be run inside transactions:

downloads: