this destructor has the possibility of throwing. entities which are responsible for opening the database should also be responsible for closing it. if this throws when another exception is active, the program will terminate.