removed transaction object and moved its methods into the database object; added db.enter method