Clean up database engine specific logic