change db&controller structure