open and close db with menu