db model generated sql