database disconnect method