feedback / send your comments
mail to luc peuvrier
chat channel
joafip users mailing list
forums

UP TO HOW IT WORKS

RETOUR A COMMENT CELA MARCHE

Object graph in a key value store

Presentation

The key are use as object reference.

The value is the object state, it is a set of  fields value.

There is two kind of value:

Example:

class Person {
private String name;
private int age;
}

data record


Composition

contact book class


A 'personal' contact list

Contact book class implementation, composition of Person is coded using TreeMap. TreeMap guarantee O(log n) access time.

class ContactBook {

private Map<String,Person> personByNameMap=new PTreeMap<String,Person>();
private Map<String,Person> personByEMailMap=new PTreeMap<String,Person>();

}


Object graph for 'personnal' contact list


Searching a contact by name or by email is navigating in tree nodes starting from root object.
Assuming each object are stored in a data record, data record searching time is O(log dataSize), object searching time is O(log n) where n is the number of contact. The search time for a contact is O(log n) * O(log dataSize)

object graph




feedback / send your comments
mail to luc peuvrier
chat channel
joafip users mailing list
forums

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.
© 2007-2012, joafip