1. close database connect when the application is closed