added db model and update sql structure