Database abstraction layer.