update data model and sql