Database Abstraction Fixes