MetaDefinition2Table is an Open Source Library that Creates/Updates a SQL table from a form definition, which is used by Enketo-Dristhi (https://github.com/MartijnR/enketo-dristhi/)