We've been talking a lot about how datastore version 3 (?) should be structured. I'd like to propose (purely to initiate discussion) that it be structured as follows:
The datastore is a collection of objects, which are arranged into version trees. Each object has a tree_id, which is an arbitrary unique identifier (string) for the version tree. The datastore will generate a new tree_id each time a new tree is created. Each object also has a version_id, which indicates the object's place in the tree. The version_id could take the form of a dotted decimal string like "4.5.2.1". Some objects are Actions, and some objects are Documents. Each Action must retain a list to all Documents associated with that Action, each represented as a (tree_id, version_id) pair. Each Document must retain a reference to the Action with which it is associated, represented as a (tree_id, version_id) pair. Each Document is only associated with a single Action; a new Action that uses a Document must always make a new version. To implement the concepts present in the current datastore, activity_id would actually be the tree_id of an Action, and object_id would be the (tree_id, version_id) pair of a Document. --Ben
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel