1.resize main window
2.fix a bug of inserting blank data to database
3.never drop data table before adding record.