finished sqls for characteristics and meta data.
xsd revision nearly finished.