Ported Revision changes to Database class.