Backport database package enhancements from Framework