Improved DatabaseSession to work with several different tables