Changes

Jump to: navigation, search

WebAPI/DataStore

400 bytes removed, 07:08, 14 April 2013
m
Incremental Schema
== Incremental Schema ==
DataStore is designed for sharing data among applications. Applications will make some assumptions on data types of attributes of objects in a data store. If the data type of an attributes is not consistent among applications, applications may be broken for reading data from other applications with different assumption on the data type. So, data types of attributes should be enforced. Every object in a data store is a tree. The path from root to any node can be represented as an ordered list of attribute names. Incremental schema is a way that define the type types of an attribute attributes while the attributes with a new path of the attribute was were found first time. In an other another word, once a new object was added to a data store, its tree of attributes will be traveled, and assigned define the type of new found attributes with the type of their values. A new attribute is an attribute whose path from root is never found before in a data store.
For example, if the following object is the object been added to a data store.
}
Then, the types table of types of attributes should bethe data store is
SN: Integer
name: String
}
The types table of types of attributes should be
SN: Integer
name: String
info phone: String
Every time a new object was added to a data store, the types of attributes of the object would be checked against the types table of the data store. The action of adding will be failed if the type of any attribute does not match the type defined in the types table.
== Issues ==
Confirm
398
edits

Navigation menu