Document from/to SQL serialization of types